I have two enumerations:
public enum AnnouncementType
{
All = 1,
Corporate = 2,
Franchisee = 3
}
public enum AnnouncementLevel
{
Urgent,
Normal
}
The first, when using @ Html.EnumDropDownListFor, will add an empty parameter to the top of the drop-down list. The second behaves as expected and does not add an empty parameter. This has something to do with setting enumeration values. Is there a way to make him behave the same way as not having assigned values?
Danno source
share