I'm simply trying to get a checkbox to display checked if a property (bool) is set to true.
This is a list of items, so I'm doing a for each in the list, then grabbing the property I'm checking HasImage
. If that is true, I want a checked box for each item.
I'm getting the error
Argument type 'bool' is not assignable to parameter type system.linq.expressions.expression-system.func rma-vm,bool
What exactly is going on?
My code:
@foreach (var item in model.rmalist)
<td>@Html.CheckBoxFor(item.HasImage)<td>