How to debug a WebMethod in ASP.NET
I have the following WebMethod in my fileName.asmx.cs file. [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string GetData(string value) { //----- //Respective code querying the database //----- } Here is the respective ajax call using jQuery getData: function (type) { var response = ""; $.ajax({ type: "POST", dataType: 'json', url: "../GetData", data: '{value:' + type.toString() + '}', async: false, contentType: "application/json; charset=utf-8", success: function (msg) { console.log('succes', msg) response = msg; } }); return response.d; } I add