I have this .aspx which has a few checkboxes and textboxes and a submit button.

Using a delegatecontrol, I add some external textboxes to that page. Now, what happens when I click the submit button it sends all the information to a list, BUT the values in the textboxes added through the delegatecontrol is not affected by the submit buttons click event, so what I want to know is: Is it possible to catch the .aspx click event in the delegatecontrol?

The reason why I don't just put in the textboxes in the .aspx file is because I don't have access to the .aspx.cs file attached to it, just the .aspx file.


One thing you can do is check for the ID of the control that caused the postback with Request.Params["__EVENTTARGET"] inside of your delegate control. I'm pretty sure you can actually get the actual event that caused the postback as well.

  • Thank you for your reply. Request.Params["__EVENTTARGET"], the __EVENTTARGET, is it an actual param or is it whatever I'd like to write inside the [""] ? – user2536 Oct 6 '11 at 11:40
  • 1
    That's the actual ID. It's a hidden field on every asp.net page, which stores the ID of the control that caused the postback so that server side events can fire. Note there are two preceding underscores in the ID. – Jon Lester Oct 6 '11 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy