Topic: How to Postback to the Main Content from an UpdatePanel
Share/Save/Bookmark

Description: Sometimes within an UpdatePanel, you would like to postback the main page.  This may need to be done if you are trying to enable or making something previously hidden visible.  You can accomplish this by using triggers.


 By placing triggers on postback controls, you can tell the update panel to perform a synchronous call versus an asynchronous call.

To place a trigger within your markup, you add the <Triggers> element within the <asp:UpdatePanel> element, as shown below:

<asp:UpdatePanel ID="uPnl_Main" runat="server">
   <ContentTemplate>
      <!-- My Content -->
   </ContentTemplate>
   <Triggers>
      <asp:PostBackTrigger ControlID="btnSomeButton" />
   </Triggers>
</asp:UpdatePanel>