title: How to use LabelFor on a strongly typed view for a list
body: <p>When I used asp.net mvc 3 scaffolding to make a list. I got a view containing a table. With the headers of that table hard coded in the view. I want to use LabelFor, so I get the l10n I need.</p>
  
  <p>What I tried to do (but failed) was:</p>
  
  <pre><code>@model IEnumerable&lt;User&gt;
  &lt;table&gt;
   &lt;tr&gt;
     &lt;th&gt;
        @(Html.LabelFor&lt;User, string&gt;(model =&gt; model.Name)) &lt;!--This line errors--&gt;
     &lt;/th&gt;
   &lt;/tr&gt;
  
  @foreach (var item in Model) {
  &lt;tr&gt;
   &lt;td&gt;
    @Html.DisplayFor(modelItem =&gt; item.Name)
   &lt;/td&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>It errors with "IEnumerable does not contain a definition for Name".. etc...</p>
  
  <p>How do I make this work?</p>