Code such as
```
@Html.EnumDropDownListFor(model => model.Null, "Please select a value")
```
Will initially display a `Nullable<T>` `enum` as shown in NullableEnum.EDDL.Closed.png. An example full list of options is shown in NullableEnum.EDDL.Open.png. "Please select a value" won't appear when the drop down is closed unless the end user explicitly selects that entry.
End users will also see the extra blank slot in addition to the option label if an `enum` expression has a current value which isn't defined in the `enum` e.g. an uninitialized `enum` property where the `enum` type doesn't include a value for `0`.
The blank slot appears by design. This ensures we round-trip any model state. But we should use the entry for the option label when the developer has given one.
Fix is simple for a bit of confusion in this recent addition.
```
@Html.EnumDropDownListFor(model => model.Null, "Please select a value")
```
Will initially display a `Nullable<T>` `enum` as shown in NullableEnum.EDDL.Closed.png. An example full list of options is shown in NullableEnum.EDDL.Open.png. "Please select a value" won't appear when the drop down is closed unless the end user explicitly selects that entry.
End users will also see the extra blank slot in addition to the option label if an `enum` expression has a current value which isn't defined in the `enum` e.g. an uninitialized `enum` property where the `enum` type doesn't include a value for `0`.
The blank slot appears by design. This ensures we round-trip any model state. But we should use the entry for the option label when the developer has given one.
Fix is simple for a bit of confusion in this recent addition.