Prevent Updates to Child Controls

Listing 3. Prevent updates to child controls within an UpdatePanel by setting ChildrenAsTriggers to False and UpdateMode to Conditional.

<asp:UpdatePanel ID="upTerritories" runat="server" 
  ChildrenAsTriggers="False" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:DataList ID="dlTerritories" runat="server" CellPadding="4" 
          DataKeyField="TerritoryID" DataSourceID="sdsTerritories"                  
          OnItemCommand="DataList1_ItemCommand">
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lbTerritories" 
                  Text='<%# Eval("TerritoryDescription") %>' 
                  CommandName="TerritoryClick"
                  CommandArgument='<%#Eval("TerritoryID") %>'/>
                 <br />
            </ItemTemplate>
        </asp:DataList>
    </ContentTemplate>
</asp:UpdatePanel>

<asp:UpdatePanel ID="upEmployees" runat="Server">
    <ContentTemplate>
        <asp:DataList ID="dlEmployees" runat="server" CellPadding="4" 
           DataSourceID="sdsEmployees">
            <ItemTemplate>
                <asp:Label ID="NameLabel" runat="server" 
                  Text='<%# Eval("Name") %>'></asp:Label><br />
                <br />
            </ItemTemplate>
        </asp:DataList>
    </ContentTemplate>
</asp:UpdatePanel>