/ Published in: ASP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if (Request.Form["__EVENTTARGET"] == MyControl.ClientID) ... Although this will work for CheckBoxes, DropDownLists, LinkButtons, etc, this does not work for Button controls. This is where the second part comes in. You can use the sender._postBackSettings.panelID property to identify the control which raised the click. This will avoid the EndRequestHandler called on any post back. something like if(sender._postBackSettings.panelID == "UpdatePanel1|LinkButton1") alert('From LinkButton'); else alert("Some other control");
URL: http://ryanfarley.com/blog/blog/archive/2005/03/11/1886.aspx