title: ASP.Net MVC Html.HiddenFor with wrong value
body: <p>I'm using MVC 3 in my project, and I'm seeing a very strange behavior.</p>
  
  <p>I'm trying to create a hidden field for a particular value on my Model, the problem is that for some reason the value set on the field does not correspond to the value in the Model.</p>
  
  <p>e.g.</p>
  
  <p>I have this code, just as a test:</p>
  
  <pre><code>&lt;%:Html.Hidden("Step2", Model.Step) %&gt;
  &lt;%:Html.HiddenFor(m =&gt; m.Step) %&gt;
  </code></pre>
  
  <p>I would think that both hidden fields would have the same value.
  What I do is, set the value to 1 the first time I display the View, and then after the submission I increase the value of the Model field by 1.</p>
  
  <p>So, the first time I render the page both controls have the value 1, but the second time the values rendered are these:</p>
  
  <pre><code>&lt;input id="Step2" name="Step2" type="hidden" value="2" /&gt;
  &lt;input id="Step" name="Step" type="hidden" value="1" /&gt;
  </code></pre>
  
  <p>As you can see, the first value is correct, but the second value seems to be the same as the first time I display the View.</p>
  
  <p>What am I missing? Are the *For Html helpers caching the values in some way? If so, how can I disable this caching?.</p>
  
  <p>Thanks for your help.</p>