EnumHelper Methods
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | GetSelectList(ModelMetadata) | Gets a list of SelectListItem objects corresponding to enum constants defined in the given metadata. |
![]() ![]() | GetSelectList(ModelMetadata, Enum) | Gets a list of SelectListItem objects corresponding to enum constants defined in the given metadata. Also ensures the value will round-trip even if it does not match a defined constant and sets the Selected property to true for one element in the returned list -- matching the value. |
![]() ![]() | GetSelectList(Type) | Gets a list of SelectListItem objects corresponding to enum constants defined in the given type. |
![]() ![]() | GetSelectList(Type, Enum) | Gets a list of SelectListItem objects corresponding to enum constants defined in the given type. Also ensures the value will round-trip even if it does not match a defined constant and sets the Selected property to true for one element in the returned list -- matching the value. |
![]() ![]() | IsValidForEnumHelper(ModelMetadata) | Gets a value indicating whether the given metadata or associated expression is suitable for use in GetSelectList and EnumDropDownListFor<'TModel, 'TEnum> calls. |
![]() ![]() | IsValidForEnumHelper(Type) | Gets a value indicating whether the given type or an expression of this type is suitable for use in GetSelectList and EnumDropDownListFor<'TModel, 'TEnum> calls. |

