Asp.net MVC Label For
- by Jaimal Chohan
I have the following
<label for="Forename">Forename</label>
<%= Html.TextBoxFor(m => m.Customer.Name.Forename) %>
the problem with this is that this is rendered as
<label for="AddressLine1">Address Line 1</label>
<input type="text" value="" name="Customer.Address.Thoroughfare" id="Customer_Address_Thoroughfare">
not what I want ofc.
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?