【发布时间】:2012-09-21 21:58:56
【问题描述】:
我有一个扩展器控件,并希望从其中调用 webmethod。但 Sys.net.webserviceproxy.invoke 和 $.ajax 都不起作用。 $.ajax 发出服务器超时错误。 invoke 有效,但不调用 web 方法。代码如下
[WebMethod]
public static string calculateTime(string dateTime) {
return result;
}
扩展器控件中调用 web 方法的方法。
timer: function(){
Sys.Net.WebServiceProxy.invoke("CaculateTime.asmx", "calculateTime",false,{"dateTime":""+this._timestamp+""}, function (result, e){ this.get_element().innerText=result ;}, function(result, e){},"User Context", 100);
},
【问题讨论】:
标签: asp.net ajax asp.net-ajax extender