I am displaying a list of data in the following manner;
Surname Forename Email Address Email Distribution Ops Manager Sign Off Admin Inputter<div class="pager">
<%: Html.PageLinks(Model.PagingInfo, x=> Url.Action("List", new { page = x })) %>
</div>
and in the partial view;
<tr>
<td>
<%: Html.ActionLink("Edit", "Edit", new { id=Model.UserId }) %> |
<%: Html.ActionLink("Details", "Details", new { id=Model.UserId })%> |
<%: Html.ActionLink("Delete", "Delete", new { id=Model.UserId })%>
</td>
<td>
<%: Model.Surname %>
</td>
<td>
<%: Model.Forename%>
</td>
<td>
<%: Model.EmailAddress%>
</td>
<td>
<%: Html.CheckBoxFor(x => x.EmailDistributionListFlag) %>
</td>
<td>
<%: Html.CheckBoxFor(x => x.OperationsManagerFlag)%>
</td>
<td>
<%: Html.CheckBoxFor(x => x.SignOffManager)%>
</td>
<td>
<%: Html.CheckBoxFor(x => x.AdministratorFlag)%>
</td>
<td>
<%: Html.CheckBoxFor(x => x.InputterFlag)%>
</td>
</tr>
I want to put a click event on each checkbox, so when the checkbox is clicked I can do a database update. However I do not appear to have a unique client name for each checkbox. So I would like to know how to put the click event on the checkbox, and how do I know which user row has been clicked in relation to the checkbox.