Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading data from Checkboxes

Status
Not open for further replies.

cyberprof

Programmer
Jun 10, 2003
229
GB
Using ASP I've developed a page that reads data from a database and lists the results in a table. The results are a list of tasks that I want to be able to select with a checkbox. So each line in the table has a check box and then the task details.

The list is dynamic and the list size can change. When I submit the form to the next page, is there a command I can use that knows exactly how many checkboxes are in the list, along with the checkbox name and value (CHECKED OR UNCHECKED)

Cheers

J
 
This will show you all the items that get submitted from your form.
<%
For Each item in Request.Form
Response.Write item & " : " & Request.Form(item) & "<BR>"
Next
%>

Tony
________________________________________________________________________________
 
Thanks, just done it myself the same way. Cheers
 
Checkboxes only pass their value when they are checked. The value they pass is the one you specify in the tag, so you might be better off naming them all the same and assigning them values based on the task sitting next to them on the screen. This would then be passed as a comma-delimited string of all the checked task values.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top