I have a dropdown
in which i was able to get/set the selected value when the property is string
, but when it is bool
i couldn't able to get/set the value.
//Code:
<div class="editor-field">
@Html.DropDownListFor(model => model.SelectedStatus, Model.SelectedStatusList(), "--Select--")
@Html.ValidationMessageFor(x => x.SelectedStatus, "Field is required")
</div>
How can i achieve this?