I have a checkbox in a loop so how i know which checkbox is checked.
- <div style="overflow-x:auto;">
- <table id="customers">
- <caption><h3>Assign Privileges</h3></caption>
- <tr>
- <th>Modules</th>
- @foreach (var action in ViewBag.AllAction)
- {
- <th>@action.Action_name</th>
- }
- <th></th>
- </tr>
- @foreach (var data in ViewBag.allmodel)
- {
- <tr>
- <td>@data.Controller_Name</td>
- @foreach (var ac in ViewBag.AllAction)
- {
- <td>
- <input type="checkbox" class="allchkbox" />
- </td>
- }
- </tr>
- }
- </table>
- </div>
This is my code i have checkbox with same class . this is my view .i want to check that which module checkbox ix checked