title: ASP.Net MVC 2.0 Html.HiddenFor HtmlHelper extension doesn't return the Value
body: <p>We're trying to be type-safe in our views and use the new ExpressionInputExtenssion HtmlHelpers, but we are seeing some inconsistent results. We have a view that looks like this:</p>
  
  <pre><code>ViewData.Model.FooID = &lt;%= ViewData.Model.FooID %&gt;&lt;
  Model.FooID = &lt;%= Model.FooID  %&gt;       
  &lt;%= Html.HiddenFor(x=&gt;x.FooID) %&gt;  
  </code></pre>
  
  <p>But what we see in the rendered view is this:</p>
  
  <pre><code>ViewData.Model.FooID = 515b0403-e75b-4bd7-9b60-ef432f39d338
  Model.FooID = 515b0403-e75b-4bd7-9b60-ef432f39d338    
  &lt;input id="FooID" name="FooID" type="hidden" value="" /&gt;  
  </code></pre>
  
  <p>I can manually add this:</p>
  
  <pre><code>&lt;input id="FooID" name="FooID" type="hidden" value="&lt;%= Model.FooID %&gt;" /&gt;
  </code></pre>
  
  <p>But now we are no longer, but surprisingly when I do, The Html.HiddenFor always has the correct value.</p>