views:

768

answers:

2

Hi,

I've got multiple UpdatePanel's on a page and i'm updating 2 of them manually by calling __doPostBack. However the problem is the first call seems to be reset when the second call is made (it never updates the panel that i requested to update first). I've got these calls wrapped in setTimeout, but it does not seem to help.

Any suggestions on how to make both calls work?

A: 

You could probably do this on the server side of things:

UpdatePanel1.Update();
UpdatePanel2.Update();

This causes the return from the submission to contain updated information for both panels, instead of just one at a time. I believe the update panels need to be set for conditional updates however.

Also, another question, do you have the script that calls setTimeout inside the update panel? Or is it elsewhere, that may be the culprit, however I do not know off the top of my head on that one.

Redbeard 0x0A
A: 

This is an old post, but I have the same problem. Did you find a solution for this!?

My solution does work on the client if, and only if, i include an alert('') right before the __doPostBack call. But this is not a user friendly solution...

EDIT: The problem is that a new request stoppes previous requests on the client, wich means that only the last request remains, and finally returns. The alert('') stoppes the javascript execution from issuing more requests.

Working with this for awhile I ended up with a javascript solution doing postbacks one at a time, as soon as the one before ended by listening to the the endRequest event fo the PageRequestManager.

JERKER