i have the Following Code in Jquery:function CheckSession() { debugger; $.ajax({ url: 'Site.Master/CheckSession', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: "json", success: function (result) { debugger; if (result.d != '') { } }, error: function (error) { alert(error.responseText); }, async: false }); };i am getting the error as follows:post http://localhost:49669/kaizen2g/site.master/checksession 403(forbidden)In Code Behind Site.master page I have this:[WebMethod] public void CheckSession() { if (Session[KaizenConstants.CURRENTLOGGEDINUSER] == null) { Response.Redirect("Login.aspx"); } }why is it so ??how to solve it??ThanksHarshal 解决方案 这篇关于我如何使用Jquery Ajax调用母版页方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-12 09:54