Search code examples
c#asp.netajaxupdatepanelpostback

UpdatePanel partial postback hits breakpoints of controls outside the Panel


The following does a partial post back:

<MyApp:MyOtherCustomControl runat="server" />

<asp:UpdatePanel runat="server" UpdateMode="Conditional">
  <ContentTemplate>
      <asp:LinkButton runat="server" ID="homeLink" OnClick="LoadTabHome">Update the Panel</asp:LinkButton>
  </ContentTemplate>
</asp:UpdatePanel>

My question is, why are breakpoints in MyOtherCustomControl being touched? That control is not inside the UpdatePanel.


Solution

  • When an UpdatePanel performs a aSync postback, the whole page lifecycle is executed, this is why all the server-side Controls breakpoints are firing. The entire page lifecycle will be executing and any differences will be displayed inside the update panel anything outside of the update panel will be for lack of a better word "dropped" or forgotten by the page. MSDN