I’m trying to pass a List<int> from my View to my Controller. I’ve tried multiple ways, with different parameters. No luck.
I’m currently trying to pass {[4,5,13]} to a method with the parameter List<int> ids.
What’s the correct format to send a list or array of numbers?
I believe that you have to pass in something like this:
If you are using AJAX, then I remember that I had to set
traditionalto true (See the jquery ajax documentation) This was so that the parameters were able to be parsed properly.