M
middletree
I have a page which has something like 100 checkboxes, in three categories,
so I chose to build the checkboxes into the page like this:
<%
strSQL = "SELECT PeopleID, PeopleDesc "
strSQL = strSQL & "FROM People "
strSQL = strSQL & "ORDER BY PeopleDesc"
set rs = conn.execute(strSQL)
strTempRow = 0
While Not RS.EOF
Response.Write "<td colspan=2><input type=checkbox
value='"&RS.Fields("PeopleID")&"'>"&RS.Fields("PeopleDesc")&"</td>"
strTempRow = strTempRow + 1
If strTempRow mod 2 = 0 then
response.write "</tr><tr>"
Else
End if
RS.MoveNext
WEND
RS.Close
set RS = nothing
%>
As you can see, I don't have a name for the checkbox, but of course, I need
to have that, so that on the next page, I can retrieve the value and insert
it into a database, if it was selected.
How is this handled on this page? How is it handled on the next page? I am
at a loss to figure this out.
so I chose to build the checkboxes into the page like this:
<%
strSQL = "SELECT PeopleID, PeopleDesc "
strSQL = strSQL & "FROM People "
strSQL = strSQL & "ORDER BY PeopleDesc"
set rs = conn.execute(strSQL)
strTempRow = 0
While Not RS.EOF
Response.Write "<td colspan=2><input type=checkbox
value='"&RS.Fields("PeopleID")&"'>"&RS.Fields("PeopleDesc")&"</td>"
strTempRow = strTempRow + 1
If strTempRow mod 2 = 0 then
response.write "</tr><tr>"
Else
End if
RS.MoveNext
WEND
RS.Close
set RS = nothing
%>
As you can see, I don't have a name for the checkbox, but of course, I need
to have that, so that on the next page, I can retrieve the value and insert
it into a database, if it was selected.
How is this handled on this page? How is it handled on the next page? I am
at a loss to figure this out.