If I have a simple controller routed as follows:
context.MapRoute( "Default", "{controller}/{action}", new { controller = "Base", action = "Foo"} );
And the action of the Foo controller is as follows:
[HttpPost] public ActionResult Foo(object bar) { ... }
How will the bar be bound? I am debugging and see that this is a string , but I'm not sure if it will always be bound to a string.
Basically, I want the method to accept bool , List<int> and int . I can send a type parameter and make a model of binding myself from the message. (A message is a form message).
Here are my current messages &bar=False or &bar=23 or &bar[0]=24&bar[1]=22 .
I know that I can see the message inside the Foo action method, but I want some input to be the best way to handle this in MVC3
source share