Shubham Agarwal

Shubham Agarwal

  • NA
  • 32
  • 594

How i know which checkbox is checked.

May 1 2018 12:47 AM
I have a checkbox in a loop so how i know which checkbox is checked.
  1. <div style="overflow-x:auto;">  
  2. <table id="customers">  
  3. <caption><h3>Assign Privileges</h3></caption>  
  4. <tr>  
  5. <th>Modules</th>  
  6. @foreach (var action in ViewBag.AllAction)  
  7. {  
  8. <th>@action.Action_name</th>  
  9. }  
  10. <th></th>  
  11. </tr>  
  12. @foreach (var data in ViewBag.allmodel)  
  13. {  
  14. <tr>  
  15. <td>@data.Controller_Name</td>  
  16. @foreach (var ac in ViewBag.AllAction)  
  17. {  
  18. <td>  
  19. <input type="checkbox" class="allchkbox" />  
  20. </td>  
  21. }  
  22. </tr>  
  23. }  
  24. </table>  
  25. </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
 

Answers (4)