Muxa
Muxa

Reputation: 5643

Calling multiple __doPostBack from JavaScript

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?

Upvotes: 0

Views: 2727

Answers (1)

Astra
Astra

Reputation: 11221

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.

Upvotes: 2

Related Questions