Leonard
Leonard

Reputation: 3092

Nestled UpdatePanels causes full page postback

I'm having issues with nestled, custom user controls that causes full page postbacks despite being encapsulated by an UpdatePanel.

The update panel:

<asp:Content ID="mainContentPane" ContentPlaceHolderID="mainContent" runat="server">
    <asp:ScriptManager ID="smNetAjax" runat="server" />
    <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="pnlAssetTabView">
        <ContentTemplate>
             <custom:AssetTabView runat="server" ID="tvAddAssets" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

The AssetTabView-control:

<custom:TabView runat="server" ID="tvTabView" OnSelectedTabChanged="tvTabView_SelectedTabChanged" />
<custom:AssetList runat="server" ID="dalAssetList" />

And finally the TabView whose links causes full page postback:

<SelectedItemTemplate>
    <div class="tab current">
        <div class="left"></div>
        <asp:LinkButton ID="ExtendedLinkButton1" runat="server"><span><%# DataBinder.Eval(Container.DataItem, "HeaderText") %></span></asp:LinkButton>
        <div class="right"></div>
    </div>                                            
</SelectedItemTemplate>

<ItemTemplate>
    <div class="tab">
        <div class="left"></div>
        <asp:LinkButton OnCommand="ProcessTabSelection" CommandArgument='<%# Container.ItemIndex %>' ID="ExtendedLinkButton2" runat="server" TabIndex='<%# TabIndex + Container.ItemIndex %>'><span><%# DataBinder.Eval(Container.DataItem, "HeaderText") %></span></asp:LinkButton>
        <div class="right"></div>
    </div>                                            
</ItemTemplate>

<FooterTemplate>
    </div>
</FooterTemplate>

I'm really running out of ideas right and I'm desperate for any ideas that you might have! Thank you.

Upvotes: 1

Views: 225

Answers (1)

hungryMind
hungryMind

Reputation: 6999

You have option of ProxyScriptManager. You don't need name of update panel, u can iterate to control list till closest-upward update panel is found.

Upvotes: 1

Related Questions