Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 [""] ? –  Daniel Ziga 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
    
Thank you for that info –  Daniel Ziga Oct 6 '11 at 12:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.