由网友(逍遥人世欢)分享简介:jQuery的电话:Jquery call: $.post({url: "http://localhost:60700/Main//Data/dataServices.aspx",data: { action: "savePhoneData", phoneID: PhoneID, values : JSON.s...
jQuery的电话:
Jquery call:
$.post({
url: "http://localhost:60700/Main//Data/dataServices.aspx",
data: { action: "savePhoneData", phoneID: PhoneID, values : JSON.stringify(allData) },
success: phoneSaved,
error: phoneSavedFailed
});
我有一个在项目中使用类似的功能在 GET 方式和工作就好了。 在这种情况下,然而,发表必须使用由于数据量。
I have similar functions in the project that use the GET method and work just fine. In this case, however, POST must be used due to the amount of data.
我得到的错误是:用于访问路径/主/ [对象的对象]中的HTTP动词POST是不允许的。
The error I get is: The HTTP verb POST used to access path '/Main/[object Object]' is not allowed.
请帮忙!
推荐答案
我用了一个ASMX页面,而不是:
I used an ASMX page instead:
public class Handsets : System.Web.Services.WebService
{
[WebMethod]
public string Test(object items)
{
List<object> lstItems = new JavaScriptSerializer().ConvertToType<List<object>>(items);
return "wow";
}
}
相关推荐
最新文章