Hi we are using jquery to sending ajax requests but its returns page's content everytime. We are using .NET Framework version 2
$.ajax({
type: "POST",
url: "ajaxPage.aspx/testMethod",
data: "{test:'test'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
$("#span_result").html(result.d).fadeIn();
},
error: function (msg) {
$("#span_result").hide();
}
});
//ajaxPage.aspx.cs
[System.Web.Services.WebMethod]
public static string testMethod(string test)
{
return test;
}