Html.CheckBoxFor
expects a Func<TModel, bool>
as the first parameter. Therefore your lambda must return a bool
, you are currently returning an instance of List<Checkboxes>
:
model => model.EmploymentType
You need to iterate over the List<Checkboxes>
to output each checkbox:
@for (int i = 0; i < Model.EmploymentType.Count; i++)
{
@Html.HiddenFor(m => m.EmploymentType[i].Text)
@Html.CheckBoxFor(m => m.EmploymentType[i].Checked,
new { id = string.Format("employmentType_{0}", i) })
}