In razor engine I have used LabelFor helper method to display the name
But the display name is seems to be not good to display.
so i need to change my display name how to do it….
@Html.LabelFor(model => model.SomekingStatus, new { @class = "control-label"})
You could decorate your view model property with the
[DisplayName]attribute and specify the text to be used:Or use another overload of the LabelFor helper which allows you to specify the text:
And, no, you cannot specify a class name in MVC3 as you tried to do, as the
LabelForhelper doesn’t support that. However, this would work in MVC4 or 5.