Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

triggering a partial postback of an update panel via javascript

$
0
0

Hi,

I have this update panel:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False" EnableViewState="False">
<ContentTemplate>

Inside the update panel is a flash control that when it finishes fires a javascript function on the client side which says "OK, done!", via the comman:

            function onControl1Complete() {
                 alert("OK, done!");               
            }

What we also need to do is to run some server side code and then do a partial refresh of UpdatePanel1 so that the user does not only see "OK done", but also a few changed controls etc.

I tried __doPostBack('Control1', 'Control1') inside the .

            function onControl1Complete() {
                 alert("OK, done!");      

         __doPostBack('Control1', 'Control1');
            }

This posts back and I am able to catch it server side via the eventTarget "Control1". However this seems to do a full postback, not only flickering the screen but messing up all other javascript running on the page, nothing works anymore after that.

A solution may be to get the js to only trigger a partial postback.

How could this be accomplished?

Thank you!

Best regards,

D


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>