In my users form I want to use the html.Labelfor helper, but instead of Model Property name of CatName, I would like Category Name Instead. I know I could put this in a , but I have to reuse the names over and over. Below is example.
Model Property:
public string CatName { get; set; }
VIEW:
@Html.LabelFor(model => model.CatName) //Displays CatName , I want Category Name
You can use
DataAnnotationsThis is the preferred way.
You can also use the overload of
LabelForthat takes a string for the label text