Saurabh Singh

Saurabh Singh

  • NA
  • 30
  • 8.8k

How do I iterate through each row and cell of a table.

Feb 2 2016 11:43 PM
How do I iterate through each row and cell of a table and get values when check box is checked,
Here is my HTML Code. 
 
 
<table align="center" width="100%" id="tblTicket">
<thead class="gridHead">
<tr>
<th>
@Html.ActionLink("Ticket No", "TicketQueue")
</th>
<th>
Select Ticket
</th>
</tr>
</thead>
@foreach (var item in ViewBag.QueueTbl)
{
<tr>
<td>@item.Ticket_ID
</td>
<td align="center">
<font color="#F0E2FC"> @Html.CheckBox("chkTicket", new { value = item.Ticket_ID })
</font>
</td>
</tr>
}
</table>

Answers (1)