title: LabelFor() in a foreach
body: <p>I have a view with a strongly-typed model associated with it</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
                    Inherits="System.Web.Mvc.ViewPage&lt;SomeNamespace.SomeViewModel&gt;" %&gt;
  </code></pre>
  
  <p>The SomeViewModel looks like this</p>
  
  <pre><code>class SomeViewModel
  {
      public IEnumerable&lt;Foo&gt; Foos {get; set;}
  }
  </code></pre>
  
  <p>and say Foo is</p>
  
  <pre><code>class Foo
  {
     public string Bar {get; set;}
  }
  </code></pre>
  
  <p>and in the view</p>
  
  <pre><code>&lt;% foreach (var item in Model.Foos) { %&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;%= Html.LabelFor(f =&gt; f.Bar) %&gt;
          &lt;/td&gt;
  </code></pre>
  
  <p>I'm not sure how to display <code>Bar</code> property in <code>item</code> using <code>Html.LabelFor()</code></p>
  
  <p>Can someone help me with this?</p>
  
  <p>Thanks,</p>