title: Format Date On Binding (ASP.NET MVC)
body: <p>In my ASP.net MVC app I have a view that looks like this:</p>
  
  <pre><code>...
  &lt;label&gt;Due Date&lt;/label&gt;
  &lt;%=Html.TextBox("due")%&gt;
  ...
  </code></pre>
  
  <p>I am using a <code>ModelBinder</code> to bind the post to my model (the due property is of <code>DateTime</code> type). The problem is when I put "01/01/2009" into the textbox, and the post does not validate (due to other data being input incorrectly). The binder repopulates it with the date <strong>and time</strong> "01/01/2009 <strong>00:00:00</strong>". </p>
  
  <p><strong>Is there any way to tell the binder to format the date correctly (i.e. <code>ToShortDateString()</code>)?</strong></p>