Click to See Complete Forum and Search --> : Asking the Request.Form object to display it's collection.


AnaFyr
11-27-2003, 01:32 AM
Hi y'all...

I'm currently testing transactions, and need to see the Form collections Name/Value pairs being sent to the server.

How can I command the script to show me the collection?

I thought it was:

Dim CollectionVariable
CollectionVariable = Request.Form ().Count

Response.Write CollectionVariable



This returns the number of elements in the Form collection; but I want to see those elements.

I want to create a For loop to go thru the Form collection and Response.Write those results to the page.

What am I doing wrong?

Help!

GlennCarter
11-27-2003, 06:06 AM
Have you tried something like this?

for each x in Request.Form()
response.write(x.name)
next

GlennCarter
11-27-2003, 06:20 AM
Try this - I've tested it and it seems to work.

Dim CollectionVariable, iForm
CollectionVariable = Request.Form().Count
Response.Write(CollectionVariable)

for x=1 to CollectionVariable
response.write(Request.Form.key(x))
response.write(Request.Form.item(x))
next