I have a labelfor attricbute that is displaying the default label text in my MVC3 Razor View. But I the label to display different text. How can I accomplish this here is an example of my code:
<div class="editor-label">
@Html.LabelFor(model => model.CA_AgencyID)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.CA_AgencyID)
@Html.ValidationMessageFor(model => model.CA_AgencyID)
</div>
A way to do this is to add the DisplayNameAttribute to your model: