I have it:
[Display(Name = "Empresa")] public string Company{ get; set; }
In my aspx, I:
<th><%: Html.LabelFor(model => model.Company)%></th>
And this generates:
<th><label for="Company">Empresa</label></th>
Are there any helper html extensions to show a display attribute without a label, just plain text? My desired result:
<th>Empresa</th>
Thanks!
EDIT
I tried DisplayFor or DisplayTextFor, as suggested, but they are not valid as they generate:
<th>Amazon</th>
They return the value of the property ... I want the name from the Display attribute.
source share