I'm trying to add int[] array to my Url.Action something like this:
var routeData = new RouteValueDictionary();
for (int i = 0; i < Model.GroupsId.Length; i++) {
routeData.Add("GroupsId[" + i + "]", Model.GroupsId[i]);
}
in my view:
Url.Action("Index", routeData)
but in html I'm getting:
GroupsId%5B0%5D=1213&GroupsId%5B0%5D=1214
and not:
GroupsId=1213&GroupsId=1214
I need it because I have a checkbox list, and when I do post I'm binding groupIds to int[] and then pass to view where I have export button with Url.Action that doesn't work correctly for me.