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
swf file won't play on the web
How to tranlate SQL query to WQL query for SCCM 2007
Enumerable or Strongly typed List of Guids
Access / how many users connected?
how to transfer browser requests from HTTP to HTTPS
Windows Rights Management Server
How to request previous month's records in my sql's where clause?
Displaying GroupWise contacts in Exchange address book?
How to convert non ansi outer join =* to ansi outer join
Windows XP - Shutdown Causes Restart