title: Asp.net MVC Label For
body: <p>I have the following</p>
  
  
  
  <pre class="lang-html prettyprint-override"><code> &lt;label for="Forename"&gt;Forename&lt;/label&gt;
   &lt;%= Html.TextBoxFor(m =&gt; m.Customer.Name.Forename) %&gt;
  </code></pre>
  
  <p>the problem with this is that this is rendered as</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;label for="Forename"&gt;Forename&lt;/label&gt;
  &lt;input type="text" value="" name="Customer.Name.Forename" id="Customer_Name_Forename"&gt;
  </code></pre>
  
  <p>not what I want ofc.</p>
  
  <p>I would like an extension to render the label correctly (i.e. with the for="" attribute having the value of the input id), is there anything in MVC 2 that does this nativly before I go writing my own extension?</p>