My controller method looks like this:
public ActionResult SomeMethod(Dictionary<int, string> model)
{
}
Is it possible to call this method and populate "model" using only query string? I mean, typing something like this:
ControllerName/SomeMethod?model.0=someText&model.1=someOtherText
in our browser address bar. Is it possible?
EDIT:
It would appear my question was misunderstood - I want to bind the query string, so that the Dictionary method parameter is populated automatically. In other words - I don't want to manually create the dictionary inside my method, but have some automathic .NET binder do it form me, so I can access it right away like this:
public ActionResult SomeMethod(Dictionary<int, string> model)
{
var a = model[SomeKey];
}
Is there an automatic binder, smart enough to do this?