我想使用Pagemethod将类返回给javascript。是否需要在客户端和服务器端双方创建相同的类构造?
答案 0 :(得分:0)
<WebMethod()> _
Public Shared Function checkTime(ByVal ID As Integer) As Integer()
Do something and return the value
End Function
在javascript上调用方法:
PageMethods.checkTime(ID, OncheckTimeComplete, OncheckTimeError, senderInfo);