Microsoft
Software
Hardware
Network
Question : Capture ClientID of a linkbutton sender
I have a bunch of linkbuttons on a webform where I need to do something based on the ClientID of the linkbutton clicked on. The click event of all the linkbuttons is served by the following codebehind:
protected void MenuItemClick(object sender, EventArgs e)
{
}
How can the clientID of the linkbutton sender be captured in the above code?
Thanks for your help.
Answer : Capture ClientID of a linkbutton sender
First Convert the sender in the Control Type ot os coming from Eg.
Button Btn = (Button)sender;
//Now you can get the client ID as follows:
Btn.ClientID
Hope it helps.
Random Solutions
vCenter Converter and SBS2008
Adding URL Parameter
Double Table when margin is adjusted
Merge data in Access 2003
sharing permission in Windows2003
Backup power
SSH console: go to specified folder after login
Delete query (sql)
using a hidden form with .hta script
Hung Login Processing 'Printers' Group Policy on Win2K8 Std running in ESXi 4.x