I've got problem with binding data type boolean to checkbox in MVC 2 data annotations Here's my code sample:
label>
Is Hot
</label>
<%=Html.CheckBoxFor(model => model.isHot, new {@class="input" })%>
It always raise this error message below at (model=>model.isHot).
Cannot convert lambda expression to delegate type 'System.Func<Framework.Models.customer,bool>' because some of the return types in the block are not implicitly convertible to the delegate return type
Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)
Please suggest me how can I solve this problem?
Thanks in advance.