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;
        }
原文地址:https://www.cnblogs.com/xiaomen/p/8425456.html