TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Charith Liyanagamage
NA
148
0
Identify which button clicked in Gridview
Apr 5 2012 2:41 AM
Hi All,
I have a Gridview in my webpage and there are two button fields included in gridview for selection. One is for "Adding" and other one is for "Editing".
How can i track which button is clicked inside GridView1_SelectedIndexChanged Event? Simply what i want is to get the cell id or the button id of the button clicked. Can anybody give me a hand to sort this out ?
****this is my gridview columns*****
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Image"
SelectImageUrl="~/images/addNew.png" SelectText="select" >
<ControlStyle Width="15px" />
<HeaderStyle Wrap="True" />
</asp:CommandField>
<asp:CommandField ShowSelectButton="True" ButtonType="Image"
SelectImageUrl="~/images/edit.png" SelectText="edit" >
<ControlStyle Width="15px" />
</asp:CommandField>
</Columns>
*******this is my Event***********
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
//code goes here
}
Thanks,
Max
Reply
Answers (
4
)
plese tel my code is correct or not to calculate the login and logout time
Session Issue, I guess :|