Reputation: 431
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.
Upvotes: 2
Views: 4693
Reputation: 7523
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.
Upvotes: 1
Reputation: 2583
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...
Upvotes: 0