I am very familiar with JQuery and ajax and have done what I need in the past but have spent all day trying to get what should be a simple ajax call to not return a 200, 500 or other error within this AC environment!!! I'm sure it's something stupid I'm missing.
I'm trying to get data for a dropdownlist. Does anyone have working code to share?
Here's just one iteration of what I've tried. It should just return the input string back. Instead I get 500/Internal Server Errror.
aspx file:
$.ajax({
type: "GET",
cache: false,
url: "Custom.aspx/GetShippingMethods",
data: {"addressText": addressText},
contentType: "application/json",
dataType: "json",
success: function (data) {
alert('success:' + data);
},
error: function(data) {
alert(data.status + "/" + data.statusText)
}
});
code behind:
[WebMethod]
public static string GetShippingMethods(string addressText)
{
return addressText;
}
HELP! Ajax and jquery
Re: HELP! Ajax and jquery
Whenever I run into this sort of thing, my go-to tools are chrome and use the tools (f10) to see what's occurring client-side and for server-side, I rely on Fiddler.