Currently I'm working on MVC4 web application, I need to get values which are selected or not from multiple checkboxes from the web page. Here is my code in View to render checkboxes.
using (Html.BeginForm("Controller", "NameSpace", FormMethod.Post))
{
@foreach (var Leave in Model)
{
<tr class="Row">
<td>
@Html.CheckBox("leaves")
</td>
<td>@Leave.EmployeeId</td>
<td>@Leave.EmployeeName</td>
</tr>
}
<input type="submit" name="btn" value="Approve"/>
<input type="submit" name="btn" value="Reject"/>
}
How can I get those checkBox's values in my controller...?