2
votes

I have placed a 3rd party control inside update panel after doing asynchronous postback of page associated js file of that control is not working. Is there any method to exclude a control from updatepanel. ie i don't want to post that control.

2
Does that control use javascript? Is it possible to reduce the content of that update panel? - Adrian Iftode
Explude from UpdatePanel? Remove it! I would recommend to clarify your question. - Tim Schmelter

2 Answers

1
votes

I found the exact answer for this at http://forums.asp.net/t/1098549.aspx. I'm reproducing it here with only slight modification:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
...Other controls...
<!-- This is the control to exclude -->
<asp:LinkButton ID="lnkExport" runat="server" OnClick="lnkExport_Click" Text="Export Data"></asp:LinkButton>

    </ContentTemplate>
    <Triggers>
          <!-- There are two types of triggers, AsyncPostBackTriggerand plain
               PostBackTrigger.
               Be sure to use PostBackTrigger here, which will cause a complete
               postback by this control. -->
          <asp:PostBackTrigger ControlID="lnkExport" />
    </Triggers>
</asp:UpdatePanel>

My particular problem was I had a chart control in an update panel, with a button that would allow the user to download the image of the chart. If that button was triggering the update panel, the download didn't work. But specifying the trigger as PostBackTrigger (as opposed to AsyncPostBackTrigger did the trick.

0
votes

I suggest to split up your updatepanel into 2 or more, leaving your 3rd party component outside that panels.
Is it possible in your situation? If you post your page's code, I could be more precise...