I use a function jQuery.ajaxto make an ajax call to the page method in asp.net. I specifically installed content-typein application/json; charset=utf-8. When I looked at the answer in firebug, he said that the content type is html.
Below is the code for my ajax call:
$.ajax({
async: asyncVal,
type: "POST",
url: url + '/' + webMethod,
data: dataPackage,
contentType: "application/json; charset=UTF-8",
dataType: "json",
error: errorFunction,
success: successFunction
});
source
share