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
csico catalyst3500
Move users home folders to new storage partition
How can I check for an install new updates for Symantec Backup Exec? I have clicked on the Help drop down menu, but don't see any options for updates
task manager high CPU usage widows server 2003
Can't access variable in code behind page
Software for use with EE
Easily change outgoing address. Outlook 2010 (or 2007 or 2003)
Visual Studio 2010 removal of Bite Order Mark VB -or PHP solution?
From inside network, connect to inside host using public outside IP
Why does the Listindex property of a Combobox reset to 0 in VBA?