I am using EnumDropDownListFor in ASP.NET MVC:


 @Html.EnumDropDownListFor(model => model.PhoneNumberType, new {@class = "form-control"})

This does not pre-select the value of the enum in the drop down list. If I just Display the enum value it will Show the right enum value. The DropDown is always set to the first value in the drop down, but not to the value of the enum field.

How can I configure EnumDropDownListFor to pre-select the drop down with the value of the enum field?

Related posts

Recent Viewed