I’d like to specify a “label” for a certain field in the model and use it every where in my application.
<div class="editor-field">
<%: Html.TextBoxFor(model => model.surname) %>
<%: Html.ValidationMessageFor(model => model.surname) %>
</div>
To this I’d like to add something like:
<%: Html.LabelFor(model => model.surname) %>
But labelFor already exist and writes out “surname”. But I want to specify what it should display, like “Your surname”.
I’m sure this is easy =/
Since my project was auto generated I couldn’t (shouldn’t) alter the designer.cs file.
So I created a meta data class instead, as explained here