Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net : exclude control in updatepanel from doing async postback

I have placed a user control inside update panel after doing asynchronous postback of page associated js file of that user control is not working so that is there any method to exclude a control from updatepanel in another word i don't want to post that user control.

<asp:UpdatePanel ID="upPnlAnswerList" runat="server">
    <ContentTemplate>
                       // another code that required to placed inside updatepanel

                         <div id="miancontainer" class="containerr"           
                            <klmsuc:Share ID="shareUserControl" runat="server" />

                       // another code that required to placed inside updatepanel



                    </div>
like image 386
Nishant Kumar Avatar asked Dec 08 '10 07:12

Nishant Kumar


1 Answers

Use a PostBackTrigger to perform exclusion rather than having to specify a large number of includes.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:LinkButton ID="lnkExport" runat="server" OnClick="lnkExport_Click" Text="Export Data"></asp:LinkButton>
    </ContentTemplate>
    <Triggers>
          <asp:PostBackTrigger ControlID="lnkExport" />
    </Triggers>
</asp:UpdatePanel>
like image 192
Richard Collette Avatar answered Oct 28 '22 20:10

Richard Collette