How can I send int array from $.ajax to c# mvc?
$.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.