N
.Net Sports
I have a form that on the front end Is dynamically generated by
drawing records from a database, then each record is displayed with a
checkbox next to it, where you can click multiple checkboxes, hit the
submit button in the form, and goes to a next page where it will
display the ID # of the record(s) you selected from the form page:
'''''''''''''
<form name="form1" action="postpage.asp" method="post"><input
type="checkbox" id="ID" name="ID" value="<%=RS("meID")%>">
''then the associated records are displayed inline, followed by submit
button
<input type="submit" name="go" id="go" value="GO" class="inputBox"/>
'''''''''''
works fine when selecting one record from the display; below is the
block of code that i am using to output all the ID#s from the form
data i selected:
<%
dim qid
qid = Request.Form("ID")
For each CheckedItem in Request.Form("ID")
response.write qid
next
%>
''''''''''''''''''''''''''''''''
if I select more than one record and hit submit, i will get the ID#s
of each, but i will also receive an extra figure displayed, which is
all the ID#s selected appended to each other. Ex:
1,
2
12
...and the first number will hav a comma appended to the output.
Womdering how to manage the "for each " loop in the code, or how am I
handling the event incorrectly?
drawing records from a database, then each record is displayed with a
checkbox next to it, where you can click multiple checkboxes, hit the
submit button in the form, and goes to a next page where it will
display the ID # of the record(s) you selected from the form page:
'''''''''''''
<form name="form1" action="postpage.asp" method="post"><input
type="checkbox" id="ID" name="ID" value="<%=RS("meID")%>">
''then the associated records are displayed inline, followed by submit
button
<input type="submit" name="go" id="go" value="GO" class="inputBox"/>
'''''''''''
works fine when selecting one record from the display; below is the
block of code that i am using to output all the ID#s from the form
data i selected:
<%
dim qid
qid = Request.Form("ID")
For each CheckedItem in Request.Form("ID")
response.write qid
next
%>
''''''''''''''''''''''''''''''''
if I select more than one record and hit submit, i will get the ID#s
of each, but i will also receive an extra figure displayed, which is
all the ID#s selected appended to each other. Ex:
1,
2
12
...and the first number will hav a comma appended to the output.
Womdering how to manage the "for each " loop in the code, or how am I
handling the event incorrectly?