title: MVC Model Binding subclass object property filled with a string array
body: <p>I have a base view model with an Id property of type object (so I can have it be an int or a Guid) like so:</p>
  
  <pre><code>public abstract class BaseViewModel
  {
      public virtual object Id { get; set; }
  }
  </code></pre>
  
  <p>And the view models thus derive from this</p>
  
  <pre><code>public class UserViewModel : BaseViewModel
  {
      public string FirstName { get; set; }
      public string LastName { get; set; }
  }
  </code></pre>
  
  <p>My HTML then is rendered as:</p>
  
  <pre><code>&lt;input id="Id" name="Id" type="hidden" value="240" /&gt;
  &lt;input id="FirstName" name="FirstName" type="text" value="John" /&gt; 
  &lt;input id="LastName " name="LastName " type="text" value="Smith" /&gt; 
  </code></pre>
  
  <p>And when submitted to the MVC action:</p>
  
  <pre><code>    [HttpPost]
      public ActionResult EditUser(UserViewModel model)
      {
         ...code omitted...
      }
  </code></pre>
  
  <p>The values for the model properties are:</p>
  
  <pre><code>Id: string[0] = "240"
  FirstName: string = "John"
  LastName: string = "Smith"
  </code></pre>
  
  <p>My question is, why am I getting a <strong>one item string array</strong> as the value for <strong>Id</strong>, rather than just a string? And is there a way to change this behavior? It causes problems when I try to parse it into the expected type.</p>