2

How to ASP.Net Ajax - PageMethods Synchronous call and retrieval of results ?

Currently i am doing following async call and working with data :

function checkName(name) {
     PageMethods.IsAvailable(name, onSuccess);
}

function onSuccess(result, context, method) {
    //... do something with result ....
}

How can i do same synchronously with result?

this. __curious_geek
  • 41,911
  • 22
  • 111
  • 137
Krunal
  • 3,373
  • 3
  • 21
  • 27

1 Answers1

8

IMHO this is not possible with ASP.NET AJAX because the generated wrappers use async calls. By the way you could use jQuery to call the PageMethod where it is a matter of setting async: false.

Darin Dimitrov
  • 994,864
  • 265
  • 3,241
  • 2,902
  • What's about http://stackoverflow.com/questions/6700303/any-way-to-do-a-synchronous-pagemethods-call ? – Kiquenet Mar 07 '16 at 08:50