Ok, so I have an enum from which I make a select list. After I save data, on view it display the value (number) and I want to see the text. How do I do that?
- public enum IsolationType
- {
- Mechanical = 1,
- Electrical = 2
- }
- <select class="form-control border-warning" style="font-size:12px" asp-for="ICContent.IsoType" asp-items="Html.GetEnumSelectList<IsolationType>()">
- <option value="">Isolation Type</option>
- </select>
- <span class="form-control" style="font-size:12px;">@Html.DisplayFor(modelItem => item.IsoType)</span>
