【发布时间】:2011-02-21 08:48:31
【问题描述】:
我试图使用 GET 并遇到了麻烦。现在我正在尝试切换到 POST 来尝试一下。我从
切换了我的 jquery 语句Type: GET,
到
Type: POST,
我将 .asmx 代码切换到
[WebMethod(EnableSession = true)]
[ScriptMethod]
public string testGetParametersDynamic(string firstName, string lastName)
{
string fullName = firstName + lastName;
return fullName;
}
来自
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = true)]
public string testGetParametersDynamic(string firstName, string lastName)
{
string fullName = firstName + lastName;
return fullName;
}
我现在收到此错误:
尝试使用 GET 请求调用方法 \testGetParametersDynamic\u0027
我错过了什么?
【问题讨论】:
-
在 JS 中发布调用的完整代码可能是个好主意。
-
@spender: +1; @dan_vitch:您还可以使用 firefox 的 firebug 扩展检查请求类型。
标签: c# jquery web-services