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
Windows 7 creates new profile on every login
VB.net Tab Control - How to reuse control names on tabs
basic question about factorials
Excel 2007 viewer error in Windows Server 2008 R2 terminal server (crash)
CSS Tabbed Layout IE6 Question, Part 2
RequiredFieldValidator Cant validate
Transit Vlan
delphi Run once
Removing a tidserv backdoor rootkit on XP
Hosts file resolution does not work