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="Forename">Forename</label>
<input type="text" value="" name="Customer.Name.Forename" id="Customer_Name_Forename">
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?
1 Answer