Call WebMethod inside UserControl using jQuery Ajax in ASP.Net

Last Reply 3 months ago By dharmendr

Posted 3 months ago

it is possible we call static method in usercontrl (.ascx) like this

but it not work 

$.ajax({
    type: "POST",
    url: "sortinghtmltable.ascx/GetCustomers",
    data: JSON.stringify(obj),
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: OnSuccess,
    failure: function (response) {
        alert(response.d);
    },
    error: function (response) {
        alert(response.d);
    }
});