I have in the view
@model IEnumerable<RolesMVC3.Models.Estudent>
.
.
.
@for (var i = 0; i < Model.Count(); i++)
{
<tr>
<td> @Html.CheckBox("CheckValue")</td>
<td> @Html.DisplayFor(m => m[i].CodeEstudent) @Html.HiddenFor(m => m[i].IdEstudent)</td>
<td>@Html.DisplayFor(m => m[i].NameEstudent) @Html.DisplayFor(m => m[i].LastNameEstudent)</td>
</tr>
}
.
.
.
In the controller:
[HttpPost]
public ActionResult MyController(List<ESTUDENT> estudents, List<bool> CheckValue)
{
///Actions
}
But, I reciveb two CheckBox for each student.
e.g. I am sending 29 and receive 58 in the controller
How do I associate a CheckBox with a student on this list and get in the controller?