I do have two page. One is Default.aspx and another one is DetailView.aspx. What I want to do is that I want to redirect page from Default.aspx to detailView.aspx using ajax call and I want to pass one value also. I have done something but it is not calling function that is defined into class.
I am calling this function from Default.aspx webfile
$.ajax({
type: 'POST',
url: 'DetailView.aspx/Test',
contentType: "application/json; charset=utf-8",
dataType: "json",
data: '{pid:' + result + '}',
success: function (data) {
}
});
this is class file of DetailView.aspx
[WebMethod(EnableSession = true)]
public static string Test(string pid)
{
return " ";
}
I was debugging this function but it is not calling this function at all when ajax being called.