user4184963 user4184963 - 9 months ago 50
SQL Question

recursively step through asp table (that has been populated with a query)

so basically I have a query that populates a table in an asp page like so:

<div class="span10">
<table class="table table-bordered table-striped with-check" runat="server" id="noncompulsarymodules">
<td><asp:Label ID="Label3" runat="server" Text= '<%# Eval("ModuleId") %>' style="display:none;" /> </td>
<td><asp:Label ID="Label1" runat="server" Text= '<%# Eval("noncompcode") %>' /> </td>
<td><asp:Label ID="Label2" runat="server" Text= '<%# Eval("noncomptitle") %>' /> </td>
<td><asp:Label ID="Label4" runat="server" Text= '<%# Eval("moduleunits") %>' /> </td>
<td class="center" style="overflow:hidden;"> <asp:Label ID="ModuleDescription" runat="server" Text='<%# Eval("noncompdesc") %>' /></td>
<td><input type="checkbox" /></td>

basically what I want to do is cycle through the table and take the rows that have been checked and put them into a query.

Any tips would be greatly appreciated!


Have a look at using an ASP.Net Gridview control with a checkbox / templatefield column.

You will then be able to iterate through the GridViewRows and get the checked columns.