@using FHT.Utilities @model Enum @if (Model.IsValid()) { @Html.DropDownListFor(m => m, new SelectList(EnumHelpers.Enum2Dictionary(Model.GetType()), "Key", "Value", Model.ToInt()), new { @class = "form-control"} ) } else { @Html.DropDownListFor(m => m, new SelectList(EnumHelpers.Enum2Dictionary(Model.GetType()), "Key", "Value"), new { @class = "form-control" } ) }