I have an enum with Display(Name=) that I wish to display in a Razor view but I'm getting only the value.
public enum Gender
{
[Display(Name = "Man woman")]
EveryOne = 0,
[Display(Name = "Man")]
Man = 1,
[Display(Name = "Woman")]
Woman = 2
}
Razor:
Is for: @Model.LectureGig.Gender
The Html results are:
Is for: Everyone
Instead of:
Is for: Man woman