How can I send int array from ajax to c# mvc?
问题 How can I send int array from $.ajax to c# mvc? 回答1: $.ajax({ url: <Url of the action>, type: "POST", data: JSON.stringify([1,2,3]), dataType: "json", contentType: 'application/json; charset=utf-8' }); and in the action. public ActionResult ReceiveIntArray(int[] ints) { ... } mvc should parse the json automatically. check out this question. 回答2: Try solution from this question: Set the traditional property to true before making the get call. i.e.: jQuery.ajaxSettings.traditional = true $.get(