How can I update an UpdatePanel programmatically?

     You can use the Update method of the UpdatePanel on the server-side. Make sure to set
the UpdateMode of the UpdatePanel to Conditional to get it work.

<asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1"...>


You can also use triggers that will make sure the UpdatePanel listen to a control’s event and will do an update if the event if fired and caused by a postback. Example:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">





                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />



<asp:Button ID="Button1" runat="server" Text="Button" />

Post a Comment


Close Menu