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

André Pena picture André Pena · Mar 30, 2010 · Viewed 77.2k times · Source

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

Answer

Thibault Falise picture Thibault Falise · Mar 30, 2010

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>