【发布时间】:2021-06-04 12:25:29
【问题描述】:
我以前没用过这个,所以我可能遗漏了一些东西,这可能吗?
function myFunc(obj) {
$(document).ready(function () {
$.ajax({
type: "POST",
url: "CMSWebParts_PSS_Test.aspx/CallMe",
data: obj,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
}
});
});
}
还有.cs:
public partial class CMSWebParts_PSS_Test : CMSAbstractWebPart
{ ...
[WebMethod]
public static string CallMe(string data)
{
return card;
}...
}
我不断收到 404。 尝试使用 PageMethods 但仍然得到相同的结果。
【问题讨论】:
-
为什么代码隐藏页面不继承自
: System.Web.UI.Page?
标签: ajax webforms pagemethods