Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: ocean10000
for each variable_name
what's the syntax if I have several check boxes named the same thing in a form, and I need to process however many that my user checks off.
Thanks! I'm having a real brain cloud!
Smokins way is the one i'd use for this.
The way to process form collections in a for..each is :
for each control in request.form
i = 0
For each Item In Request.Form
i = i + 1
'***DON'T DO THIS ***
Response.Write(Request.Form.Key(Item) & " " & Request.Form(Item) & "<br>")
'***DO THIS INSTEAD ***
Response.Write(Request.Form.Key(i) & " " & Request.Form(Request.Form.Key(i)) & "<br>")
Or you'll get mismatched name/value pairs.
I knew I had seen that before I just couldn't find it in my piles of code. I guess I need to find a way to search my drive for statements and other cool things that my wife doesn't really want to know about! ;)