andrerpena andrerpena - 3 months ago 15
ASP.NET (C#) Question

How do I force full post-back from a button within an UpdatePanel?

How do I force full post-back from a button within an UpdatePanel?

Answer

You can use the Triggers property of the UpdatePanel to register actions that trigger a full postback.

Add a PostBackTrigger object to that property, containig the ControlID of the control which needs to trigger a full postback.

<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
        ...
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="myFullPostBackControlID" />
    </Triggers>
</asp:UpdatePanel>