I would like to get the parameters from a URL into a Dictionary for the Controller. Here is an example:
Controller Code
public ActionResult Action(Dictionary<string,string> args)
{
//args["a"] = "1"
//args["b"] = "2"
return view(args); //sends entire dictionary
}
I have tried using extending the IValueProvider class but to no avail.
You can use the provided
to get those parameters. Its a NameValueCollection already (You can also access the keys there or iterate it as any other IEnumerable out there).