jQuery 1.3.2, ASP.NET 2.0. Making an AJAX call to a PageMethod (WebMethod) returns the full/whole page instead of just the response. A breakpoint on the page method shows
Throwing this out here as a side note. I was getting that error due to the length of my string variables in my HTML string and the website I used to get my ajax called looked like this.
loc = (loc.substr(loc.length - 1, 1) == "/") ? loc + "Default.aspx" : loc;
$.ajax({
type: "POST",
url: loc + "/" + methodName,
data: "{" + args + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: onSuccess,
error: onFail
});
It wasn't capable of extracting the .aspx link correctly, so I just hardcoded my webpage instead of using the loc var.