how write URL Link in javascript insted of
"url: "ESS/admin/OrderHistory.aspx/GetCustomers" this link is work
"url: "OrderHistory/GetCustomers" this link is not work for us
In Global.asax
static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("OrderHistory", "OrderHistory", "~/Admin/OrderHistory.aspx");
}
function GetCustomers(pageIndex) {
$.ajax({
type: "POST",
url: "OrderHistory/GetCustomers",
data: '{searchTerm: "' + SearchTerm() + '", pageIndex: ' + pageIndex + '}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.d);
}
});