Harikanth Kompally

Harikanth Kompally

  • 1.6k
  • 120
  • 30.8k

how to write the validation for the checkboxlistfor in MVC

Aug 21 2016 7:54 AM
tr>
<td><b>Course</b></td>
<td>
@Html.HiddenFor(m => m.Id)
@{var test = Model;
}
@Html.CheckBoxListFor(m => m.courseMappingList.CourseIds,
m => m.CourseList,
m => m.CourseId,
m => m.CourseName,
m => m.selectCheckCourseList)
@Html.ValidationMessageFor(m => m.courseMappingList)
</td>
</tr>

Answers (4)