I have an MVC action similar to this in a controller called ReportController:
[HttpGet] public virtual ActionResult Index(int id, Dictionary<string,string> filtersVal = null) { ... }
When I try to call the page as follows: http://domain.com/report/index?id=1 It correctly processes the action, but fills the filerVal parameter using MVC routing information similar to the following:
[0] = {[controller, report]} [1] = {[action, index]}
How can I avoid this, so that the filterVal parameter remains zero.
Please note that: we recently switched to MVC5 .. it worked fine in MVC3 Also: if I call the same action: http://domain.com/report/index?id=2&filterVal[0β .Key=136&filterVal [0] .Value = 1 Then it has the correct value in the "filterVal" parameter.
Can anyone suggest how can I avoid the first scenario?
Thanks.
source share