JQuery seems to give an error when trying to pass an alphanumeric parameter as follows:
$.ajax({
type: "POST",
url: "Default.aspx/AjaxTest",
data: "{eventID:9a5}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
alert(msg.d);
},
error: function(e) {
alert("Event could not be added to calendar");
}
});
when the above method is called, the error callback is called. However, when I change the eventID parameter to a purely numeric value, it works fine and the success callback is called. I would like to pass the alphanumeric value to the server method, and this does not seem to work. Any help would be appreciated.
Ahmed
source
share