Hi
i use below ajax in a js file
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "NewHere.aspx/BindDatatable",
data: "{}",
dataType: "json",
success: function(data) {
var theHtml = data.d;
// alert(data.d);
window.location.href = data.d;
},
error: function(result) {
alert("Error is " + result.value);
}
});
and in NewHere.aspx , i have [WebMethod]
but it gives error
Error is undefined..
also it does not call funtion WebMethod
pls advice issue (is it because i use ajax post in separate js file)