Microsoft
Software
Hardware
Network
Question : asp.net + gridview + linkbutton
i have a gridview that has a template field with a linkbutton in it, when the linkbutton is pressed an onclick event on the back end is fired.
on the behind code i get the value of the linkbutton with:
LinkButton lnkTest = (LinkButton)sender;
how can i get other data on the same row as the button was pressed? I would like to use some of the other fields in the same row in the code behind.
Answer : asp.net + gridview + linkbutton
get the GridView Row like below and then you can access othr data:
LinkButton lnkTest = (LinkButton)sender;
GridViewRow row = (GridViewRow) lnkTest.NamingContainer;
//Now you can get info from row.Cells
Random Solutions
How to highlight row with color in document library in sharepoint 2010?
Maxtor OneTouch 4 Family drive is no longer working
Need a 40" or larger touchscreen computer
Pervasive SQL 9.5 - odbc SELECT Query - DATE = '0000-00-00'
How to commit changes of a Typed Dataset to database at once
install lexmark c912 on windows sbs 2003 box
Static route to website in Squid
reverse ajax
Move DC role from Exchange Server
error while installing Exchang 2010