I am attempting to retrieve the bool
value from the CheckBox and assign it to the variable m.IsAdministrator
, which is of type bool?
:
@Html.CheckBoxFor(m => (bool?)(m.isAdministrator))
However, this syntax gives an error. How can I assign the bool
CheckBoxFor return value to a bool?
?