Javascript PageMethods调用使用1个参数成功,但在2上失败(未知web方法)

Javascript PageMethods调用使用1个参数成功,但在2上失败(未知web方法),javascript,asp.net,json,vb.net,pagemethods,Javascript,Asp.net,Json,Vb.net,Pagemethods,我已经成功地使用PageMethods将一个参数发布到aspx页面背后的代码中,但在尝试提供两个参数(或字符串以外的对象)时出现错误“Unknown web method” 工作代码,在我的aspx页面中: <asp:ScriptManager ID="smAjax" runat="server" EnablePageMethods="true"> </asp:ScriptManager> 在代码背后: <ScriptMethod(ResponseFormat:

我已经成功地使用PageMethods将一个参数发布到aspx页面背后的代码中,但在尝试提供两个参数(或字符串以外的对象)时出现错误“Unknown web method”

工作代码,在我的aspx页面中:

<asp:ScriptManager ID="smAjax" runat="server" EnablePageMethods="true"> </asp:ScriptManager> 
在代码背后:

<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
<WebMethod> _
Public Shared Function TestAjaxCall(ByVal item1 As String) As String
    Return item1
End Function
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
<WebMethod> _
Public Shared Function TestAjaxCall(ByVal item1 As String, ByVal item2 As String) As String
    Return item1 & ": " & item2
End Function
伴随着代码背后的变化:

<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
<WebMethod> _
Public Shared Function TestAjaxCall(ByVal item1 As String) As String
    Return item1
End Function
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
<WebMethod> _
Public Shared Function TestAjaxCall(ByVal item1 As String, ByVal item2 As String) As String
    Return item1 & ": " & item2
End Function
_
_
公共共享函数TestaXCall(ByVal item1作为字符串,ByVal item2作为字符串)作为字符串
返回项目1&“:”&项目2
端函数
移除标签成功:

<WebMethod> _
Public Shared Function TestAjaxCall(ByVal item1 As String, ByVal item2 As String) As String
    Return item1 & ": " & item2
End Function
_
公共共享函数TestaXCall(ByVal item1作为字符串,ByVal item2作为字符串)作为字符串
返回项目1&“:”&项目2
端函数