Nested Triggers UpdatePanel

My child UpdatePanel updates both its contents and the contents of its parent UpdatePanel.

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> ... <asp:UpdatePanel ID="UpdatePanel2" runat="server"> ... </asp:UpdatePanel> ... </asp:UpdatePanel> 

I do not want to update the parent UpdatePanel every time its child is updated.

+6
ajax asp.net-ajax updatepanel
source share
3 answers

Set the UpdatePanel.UpdateMode property to Conditional .

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

Project Cool :

The child update group updates only its contents and does not update the parent update panel if the update mode for the parent update for the panel is not set to "Conditional"

CodeClimber :

If set to "Conditional", the UpdatePanel will be updated only by postback created by the controls inside the panel or triggers specified. So, if you have several update panels, and you do not want to update all of them so that they are updated every time, you should set UpdateMode to conditional.

+5
source share
 <asp:UpdatePanel ID="UpdatePanel1" ChildrenAsTriggers="False" UpdateMode="Conditional" runat="server"> </asp:UpdatePanel> 
+6
source share

This is what I do

 <asp:UpdatePanel ID="UpdatePanel1" ChildrenAsTriggers="False" UpdateMode="Conditional" runat="server"> ... <asp:UpdatePanel ID="UpdatePanel2" ChildrenAsTriggers="False" UpdateMode="Conditional" runat="server"> ... </asp:UpdatePanel> ... </asp:UpdatePanel> 

In the code, after binding UpdatePanel2 Controls with data, call UpdatePanel2.Update (); Ajax only updates HTML markup in "UpdatePanel2".

+2
source share

All Articles