Dynamic table using html razor code has check box. Need to select and consume check box data without javascript
hello, I am trying to create a table with Model information. Each row has a check box that is not part of the model.
When any row in the check box and the form is submitted, I want to consume any checked rows to include in the model database.
So the table is like this:
<tbody>
@foreach (var question in Model.question)
{
<tr>
<td>@question.Id</td>
<td>@question.TestingGroup</td>
<td>@question.TestArea</td>
<td>@question.Description</td>
<td><input type="checkbox" /></td>
</tr>
}
</tbody>
This iterates over a table that is dynamic, so the number of rows is different every time. But when hit save I want to save the selected rows.
I want to do this without including a check box in my model or using javascript. Is there a way?