I have the following code
<div class="editor-label">
@Html.LabelFor(model => model.subCategoryName)
</div>
which renders html as
<div class="editor-label">
<label for="subCategoryName">Sub-Category Name</label>
</div>
How do I render clean HTML without the <label>
but still getting the value from ViewModel DataAnnotations like:
[Display(Name = "Sub-Category Name")]
public string subCategoryName { get; set; }
<div class="editor-label">
Sub-Category Name
</div
I have tried just about all the methods for @Html.XXXXXX (.DisplayTextFor, .DisplayNameFor, etc..) -- and still cant get it to work.