【发布时间】:2011-11-23 15:11:09
【问题描述】:
我正在尝试使用 $.post 方法来调用 Web 服务,我已经使用 $.ajax 方法让它工作了:
$.ajax({
type: "POST",
url: "StandardBag.aspx/RemoveProductFromStandardBag",
data: "{'standardBagProductId': '" + standardBagProductId.trim() + "' }",
success: function(){
$((".reload")).click();
},
dataType: "json",
contentType: "application/json"
});
但是当我将相同的方法移到 $.post 方法中时,它就不起作用了:
$.post("StandardBag.aspx/RemoveProductFromStandardBag",
"{'standardBagProductId': '" + standardBagProductId.trim() + "' }",
function () { $((".reload")).click(); },
"json"
);
我错过了什么?
【问题讨论】:
标签: asp.net ajax jquery asp.net-ajax