FWIW – you don’t need the bracket notation if you’re submitting simple types to the server. That is, if your request contains key=foo&key=bar&key=baz
, we’ll correctly bind that to an IEnumerable<T>
, IList<T>
, ICollection<T>
, T[]
, Collection<T>
, or List<T>
.
Unfortunately, there's no simple way to build a URL like that using the
Url.Action
helpers. Instead, you'd need to build your own query-string.
For example:
<a href="@Url.Action("YourAction", "YourController")?id=@string.Join("&id=", yourListOfIntegers)">Click me</a>