OK, it's a convoluted title. And it's probably not a very common use case, but I've run into this issue at least twice in the last 6 months, so I decided t write this small blog note on how I get around it.
Here's the case:
I have a user control, which has a button that requires a full page post back, for whatever reason.
I take this lovely user control and put it into an updatepanel along with other controls that I want to include in the partial Ajax update on one of my pages. So all these other controls work fine in the update panel, but that page PostBack control within the user control isn't working.
Ideally what I want to do is just put the id of the control into a <postback> tag in the <triggers> section of the updatepanel.
However that throws an error because at that page level the ID of the control in the user control can't be directly referenced.
Got the problem?
The solution is actually relatively straight forward, (at least the solution I'm using is).
The trick is to :
1) Add a property to your user control to just return back the control.
2) Within your Page_Load of the page, you can then just register the postback control directly using the following:
AjaxControlToolkit.ToolkitScriptManager.GetCurrent(Page).RegisterPostBackControl(myBtn);
where myBtn is the call to the user controls property that returns the control in question.
That's it really.
Give it a whirl.