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;
        }

 

posted on 2018-02-07 10:34  小门  阅读(305)  评论(0编辑  收藏  举报

导航