ASP.NET 让ajax请求webform后台方法
$.ajax({ type: "POST", url: ".aspx/getSubjectDirection", data: JSON.stringify({ "data":data }), dataType: "json", contentType: "application/json;charset=utf-8", success: function (data) { }, error: function (data) { alert(“”); } });
[WebMethod] public static string getSubjectDirection(string data) { return null; }