View Single Post
  #4 (permalink)  
Old November 19th, 2003, 01:56 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, there is a way to do that. The following code will loop through the entire form collection (when the forms' method is Post) and writes out the name and thee value of each HTML control on the form.
Code:
Dim anItem
Dim myLoop
With Response
    .Write("<h2>Form Collection</h2>")
    For Each anItem in Request.Form
        For myLoop = 1 to Request.Form(anItem).Count
            .Write("<strong>" & anItem & "</strong> = " & Request.Form(anItem)(myLoop) & "<br />")
        Next 
    Next
End with
You can use more or less the same code for the QueryString collection by changing Form to QueryString.


Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote