title: .NET MVC Action parameter of type object
body: <p>If I have a simple controller routed as follows:</p>
  
  <pre><code>context.MapRoute(
              "Default",
              "{controller}/{action}",
              new { controller = "Base", action = "Foo"}
          );
  </code></pre>
  
  <p>And the controller Foo action is as follows:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Foo(object bar) { ... }
  </code></pre>
  
  <p>How will <code>bar</code> be bound?  I have debugged and see it is a <code>string</code>, but I'm not sure if it will always be marshalled to a string.</p>
  
  <p>Basically I want to have the method accept a <code>bool</code>, <code>List&lt;int&gt;</code>, and <code>int</code>.  I can send up a type parameter and do the model binding myself from the post.  (The post is a form post).</p>
  
  <p>Here are my current posts <code>&amp;bar=False</code> or <code>&amp;bar=23</code> or <code>&amp;bar[0]=24&amp;bar[1]=22</code>.</p>
  
  <p>I know I can look at the post inside the Foo action method, but I want some input on the best way to handle this in MVC3</p>