I'm using jQuery.Form plugin to submit an array to an ASP.NET MVC (4) application.
Let's say I have an array:
var items = [ 1, 2, 3 ];
Submitting that array using jQuery.Form plugin that array will be sent as:
items[]: 1
items[]: 2
items[]: 3
(when using form-url-encoded content type)
But ASP.NET MVC does not understand that, to make MVC understand that I need to send either:
items[0]: 1
items[1]: 2
items[2]: 3
(include index)
or
items: 1
items: 2
items: 3
(no square brackets)
I can't submit as JSON because along with array and other data I also submit files.
Question: is there a way to either configure jQuery.Form to send arrays in a different format, or to teach ASP.NET MVC to understand item[]
format?