I have been trying to get the value inside of [Display(Name = '')]
to display with an integer input. I've tried what this post said to do but I'm getting errors - I think it's because I'm in .Net Core not Framework. Here is the code trying to display the display name:
@Enum.GetName(typeof(StateEnum), Timelineinfo.State) //Timelineinfo.State is an int
The enum (truncated because it's too long):
public enum StateEnum
{
Alabama, Alaska, [Display(Name = "American Samoa")] AmericanSamoa, Arizona,
Arkansas, California, Colorado, Connecticut, Delaware,
[Display(Name = "District of Columbia")] DistrictofColumbia, //continues onwards...
}