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
Unable to open Excel files...recieving error " Repairs to PDFMaker.xla
Winsock error in XP Professional Error 12029 Provider entry MSAFD Could not make an HTTP connection.
use php to create a xml tree and iterate over that tree in jquery
How does one preload an entire image directory?
Need to recover partition
passing variable from client to webservice procedure
Need to monitor specific events in SCOM 2007 R2
How to get selected row value from datatable in JSF ?
htaccess Partial Query String Rewrite
SQL Statement to exclude certain criteria