【问题标题】:ASP.Net Ajax - PageMethods Synchronous call and retrieval of resultsASP.Net Ajax - PageMethods 同步调用和检索结果
【发布时间】:2010-12-29 18:42:48
【问题描述】:

如何在 ASP.Net Ajax - PageMethods 中同步调用和检索结果?

目前我正在执行 async 调用并处理数据:

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

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

我如何与结果同步

【问题讨论】:

  • 您是否尝试过任何解决方案?

标签: asp.net ajax asp.net-ajax pagemethods synchronous


【解决方案1】:

恕我直言,这对于 ASP.NET AJAX 是不可能的,因为生成的包装器使用异步调用。顺便说一句,您可以使用 jQuery 来 call the PageMethod 设置 async: false

【讨论】:

猜你喜欢
  • 2015-12-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-29
  • 1970-01-01
相关资源
最近更新 更多