If you've ever used an AJAX UpdatePanel and needed to have a control within the UpdatePanel cause a full postback of the page, here's how you do it.
ScriptManager scriptManager = ScriptManager.GetCurrent(Page);
if (scriptManager != null)
{
scriptManager.RegisterPostBackControl(SaveButton);
}
First you have to get access to the ScriptManager on the page. Then you register the control within the UpdatePanel that needs to trigger a full postback.

Save This Page
4 comments:
Thanks!
Thanks very helpful!
But this will always cause a full postback, even when the page is being validated.
Is there another way to do this?
Thanks. This was VERY helpful!
Post a Comment