Does anyone have any insight on what's going on here? Here is my clientside jquery 1.4.1 code:
$.ajax({
type: "POST",
url: "PrintBOL/Print",
data: [1, 2, 3],
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function(xmlHttpRequest, status, errorThrown) {
console.debug(xmlHttpRequest)
},
success: function(serverReply) {
console.debug("OK")
console.debug(serverReply)
}
})
Here is my server-side method signature:
public ActionResult Print(int[] ids)
The ids parameter always comes across as null.
Any ideas?
By the way I make sure I invoke this at the top of the page:
jQuery.ajaxSettings.traditional = true
UPDATE: See comments in Steven's answer below for resolution.