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
SQL Server 2008 Licensing
Temporary URL in Plesk
How to deny write to the desktop for users?
Citrix presentation Svr 4.5 - Data collector election
MailMerge: filter results from Access
Custom control communicating an event to parent form
yum install 7 Zip
Terminal Server 2008 configure Access 2007 to enable all macros for all users?
External Monintor won't work w/ Toshiba laptop; it USED to; fn (f5) doesn't "stick"
Turn off the UAC