익스텐더 컨트롤이 있고 그 안에있는 webmethod에 대한 호출이 필요합니다. 그러나 Sys.net.webserviceproxy.invoke 나 $ .ajax는 작동하지 않습니다. $ .ajax는 서버 시간 초과 오류를 발생시킵니다. invoke는 작동하지만 웹 메서드는 호출하지 않습니다. 코드는 다음과 같습니다asp.net 아약스 익스텐더 컨트롤 with webmethod call issue with
[WebMethod]
public static string calculateTime(string dateTime) {
return result;
}
webmethod를 호출하는 Extender 컨트롤의 메서드입니다.
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);
},