Why is CheckBoxFor producing runtime error
Posted
by Picflight
on Stack Overflow
See other posts from Stack Overflow
or by Picflight
Published on 2010-03-22T08:30:40Z
Indexed on
2010/03/22
8:51 UTC
Read the original article
Hit count: 396
asp.net-mvc-2
The field the CheckBox is wired to is nullable.
On my view I get the following error:
Cannot implicitly convert type 'bool?' to 'bool'
<%= Html.CheckBoxFor(model => model.Product.Exclusive) %>
How do I fix it without having to change the database design?
© Stack Overflow or respective owner