草庐IT

PageMethod

全部标签

javascript - 我们如何将多个参数传递给 PageMethod 的 onSuccess 方法?

我从javascript方法“caller”调用PageMethod“SameMethod”,这样我就可以从数据库中获取一些值。在我获得值后,控制在“onSuccess”方法中继续。问题是我需要在“onSuccess”方法中使用来自javascript方法“caller”的一些变量值(“importantValue”)。functioncaller(){varimportantValue=1984;PageMethod.SomeMethod(param1,...,onSuccess,onFailure)}onSuccess方法应该是这样的:functiononSuccess(pageM

asp.net - 从 ASP.Net PageMethod 调用访问响应 header

当使用ASP.NetAjax调用PageMethods时,如何从“成功”方法访问Http响应header?例如:PageMethods.DoSomething(function(result){successMethod(result)},function(error){errorMethod(error)});functionsuccessMethod(result){//------howcanIaccesstheHttpresponseheadersfromhere?------}感谢您的帮助 最佳答案 在您的示例中,Page