Multiple calls to different page methods in same web page are not running in parallel (JQuery/Ajax/A
Posted
by Tony_Henrich
on Stack Overflow
See other posts from Stack Overflow
or by Tony_Henrich
Published on 2010-06-09T00:02:52Z
Indexed on
2010/06/09
0:12 UTC
Read the original article
Hit count: 926
I have several page methods defined in the code behind of an aspx page. I have several JS calls (see example below), one after the other, in the ready() method of JQuery to call these page methods. I noticed the javascript calls run asynchronously but the .NET page methods do not run in parallel. Page method 1 finishes first before page method 2 runs.
Is there a way to get all the page methods to run all at the same time? My workaround is to put each method in its own aspx page or use iframes but I am looking for better solutions.
$.ajax({
type: "POST",
url: (page/methodname),
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
....
}
}
});
© Stack Overflow or respective owner