title: ASP.NET MVC format of posted field information not returning
body: <p>I have a form built using ASP.NET MVC and the form data is being shown with controls like so:</p>
  
  <pre><code>      &lt;%: Html.TextBoxFor(model =&gt; model.thisJob.postcodeto)%&gt;
        &lt;%: Html.ValidationMessageFor(model =&gt; model.thisJob.postcodeto)%&gt;
  </code></pre>
  
  <p>So far so good. However I have just written some backend processing of the submitted information to remove training spaces: 
  ie " postcode" becomes "postcode". </p>
  
  <p>These changes are written to the returned ViewModel. I want this change to appear when the form reloads with relevant error messages.</p>
  
  <p>When I debug and check the ViewModel the spaces have been removed however when the page returns the original un-cleaned input is there. It seems that the display controls read the information from the ModelState rather than the object passed into the View. </p>
  
  <p>I have tried finding the values in the ModelState and updating them with the cleaned values but [set] seems to be disallowed.</p>
  
  <p>What I am trying to do seems pretty standard.</p>
  
  <p>Any pointers / ideas / bits of code will be gratefully received.</p>