I would like to specify a “label” for a specific field in the model and use it wherever in my application.
<div class="editor-field"> <%: Html.TextBoxFor(model => model.surname) %> <%: Html.ValidationMessageFor(model => model.surname) %> </div>
For this, I would like to add something like:
<%: Html.LabelFor(model => model.surname) %>
But labelFor already exists and writes out a "last name". But I want to indicate what it should display, for example, "Your last name."
I am sure it is easy = /
source share