Ajax直调用ASPX页面的内部方法

$.ajax({
    url: ".....call.aspx/FuncName",
    data: "{value:'value'}",
    type: "post",
    dataType: "json",
    contentType: "application/json",
    success: function (data) {
        
    }
});
    public partial class call : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        [WebMethod]
        public static bool FuncName(string value)
        {
            return true;
        }
    }

 

posted @ 2021-05-06 16:12  全栈攻城师  阅读(177)  评论(0)    收藏  举报