asp.net - How to capture the sender object in webforms on post-back? -


If I control a form / non-asp net in the webform, then how do I get the control ID, Triggered event from object?

Currently I'm adding a simple form post in my drop-down list w / jquery and want a method to capture specific controls on the server side ...

 $ {Document} .ready (function () {$ ("* [id $ = 'ddlEmployers']"). ;});  

ASP.NET Postback __EVENTTARGET rely on hidden fields, which is usually uniqueID Control which started postback as I have seen that you have two options:

  • Call the postback routine and pass the Unicode (most likely the DDLAPEER) of your dropdown. On the server side you can click on the page.
  • Manually set the __EVENTTARGET hidden area and then submit the form:

    $ ("input [name = __ \" Events]). Val ("ddlEmployers"); document.forms [0]. Submit ();


Comments