Regarding Link Button
-
Hi, I would like to know how to retrieve the text from a link button which is within a gridview. Thanks in advance. =)
-
Hi, I would like to know how to retrieve the text from a link button which is within a gridview. Thanks in advance. =)
As it is a LinkButton, you can specify the Oncommand like OnCommand="lnkClick" and in the code behind you can define the event protected void lnkClick(object sender, CommandEventArgs e) { // your logic here LinkButton lnkBut = (LinkButton)sender; string str = lnkBut.Text; } This is untested. if you provide anything specific then I can help you.. hope this helps..
Many thanks, Balamurugan
-
As it is a LinkButton, you can specify the Oncommand like OnCommand="lnkClick" and in the code behind you can define the event protected void lnkClick(object sender, CommandEventArgs e) { // your logic here LinkButton lnkBut = (LinkButton)sender; string str = lnkBut.Text; } This is untested. if you provide anything specific then I can help you.. hope this helps..
Many thanks, Balamurugan
this is the coding for the link button which is inside the gridview. I will need to retrieve the value from the link button in order to update my database.