Async post back in web forms still proceeds the whole page life cycle as if it's a traditional post. the difference is only the updated content inside target update panel that will be sent in response.
Therefore, it will not affect the content outside the UpdatePanel. If you need to achieve the requirements you mentioned, you need to change it to a full page postback ( PostBackTrigger ).
Page: <form id="form1" runat="server" method="post">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Panel runat="server" ID="pnlTest" Visible="false">
This is a test
</asp:Panel>
<asp:UpdatePanel ID="up1" runat="server" >
<ContentTemplate>
<asp:TextBox ID="txtTest" runat="server" OnTextChanged="txtestChanged" AutoPostBack="true"></asp:TextBox>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="txtTest" />
</Triggers>
</asp:UpdatePanel>
</form>
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Contributor
2400 Points
749 Posts
Re: showing a hidden panel in OnTextChanged event
Feb 04, 2021 02:44 AM|XuDong Peng|LINK
Hi anjaliagarwal5,
Async post back in web forms still proceeds the whole page life cycle as if it's a traditional post. the difference is only the updated content inside target update panel that will be sent in response.
Therefore, it will not affect the content outside the UpdatePanel. If you need to achieve the requirements you mentioned, you need to change it to a full page postback ( PostBackTrigger ).
Or put the panel in another UpdatePanel and use the update() function.
Best regards,
Xudong Peng