title: Why do I get a variable scope error (CS0136) in a Html.HiddenFor?
body: <p>Here is a stripped-down code snippet from a MVC3/Razor view file:</p>
  
  <pre><code>@foreach (var item in Model.Stuff.Items){
  &lt;tr&gt;
    &lt;td&gt;@item.Title&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      @using (Html.BeginForm()) {
          @item.Title
          @Html.HiddenFor(item =&gt; item.Title)
      }
    &lt;/td&gt;
  &lt;/tr&gt;
  }  @* End of Items foreach loop *@
  </code></pre>
  
  <p>The title shows on the first row.
  It also shows inside the form. But trying to use it in the <code>HiddenFor</code> I get error <a href="http://msdn.microsoft.com/en-us/library/973aa6bt%28v=vs.80%29.aspx" rel="nofollow">CS0136</a>: <em>A local variable named 'item' cannot be declared in this scope because it would give a different meaning to 'item', which is already used in a 'parent or current/child' scope to denote something else</em></p>
  
  <p>I don't get why that would be the case; in <code>item =&gt; item.Title</code> the first "item" is effectively just a parameter name in an anonymous function, isn't it?</p>
  
  <p>When I change it to: <code>@Html.HiddenFor(s =&gt; s.Title)</code> I get error CS1963, <em>An expression tree may not contain a dynamic operation.</em></p>
  
  <p>Background: the intention is to have two table rows per entry in Model.Stuff.Items, the first giving current information as static HTML, the second an edit form for it. (One or the other will be hidden at any time using javascript.) The form will submit to another action on this controller. All the forms submit to the same URL; the hidden values will identify which row is being updated.</p>