How can I send int array from $.ajax to c# mvc?
|
and in the action.
mvc should parse the json automatically. check out this question. |
|||||||||||||||||
|
Try solution from this question:
|
|||||
|
The way I'm doing it is with a simple
And in the JavaScript code I'm passing it as a string:
And finally I just
|
|||||||||
|
The simplest way would be to send a delimited (commas, possibly) string list of the ints as an argument on a GET request, then use So, for example
Then, on the server, use
to extract the values to a string array, then |
|||||||||
|