DotnetDude
DotnetDude

Reputation: 11807

UpdatePanels - Controls outside are re-rendered?

I have rather a complex UI page with several UpdatePanels nested. All of them are set to UpdateMode = "Conditional"

I have a listbox outside all the updatepanels. It's strange how there's a flicker on these listboxes when any buttons within the UpdatePanels are clicked.

My understanding was if the mode is conditional, this should not be happening.

Any ideas on where to start troubleshooting?

Upvotes: 3

Views: 443

Answers (2)

Lance Harper
Lance Harper

Reputation: 2226

On the parent UpdatePanels, set the ChildrenAsTriggers property to False and also look at using the Triggers element of the UpdatePanels you want to update to specify your triggers explicitly.

<asp:UpdatePanel ID="myUpdatePanel" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
        <ContentTemplate>

        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnTrigger" />
        </Triggers>
    </asp:UpdatePanel>

Upvotes: 2

Andy White
Andy White

Reputation: 88345

I'm not sure, but the browser might be doing this when it's re-rendering things within the other UpdatePanels. I wonder if you put everything inside a "global" UpdatePanel if this behavior will stop.

Upvotes: 1

Related Questions