ASP - print the entire contents of the request

I am debugging some ASP code, and I need to quickly print the current request data structure, which, I believe, is an array of key / value pairs.

I see that Request.Form (the "key") is a method for extracting individual elements.

Any tips on listing everything?

+7
asp-classic
source share
4 answers

try it

For Each item In Request.Form Response.Write "Key: " & item & " - Value: " & Request.Form(item) & "<BR />" Next 
+13
source share

Try the FOR / EACH loop:

 for each x in Request.Form Response.Write(x) Next 
+1
source share

IN:

For x = 1 to Request.Form.Count Response.Write x & ": " _ & Request.Form.Key(x) & "=" & Request.Form.Item(x) & "<BR>" Next

I have other classic ASP code snippets:

https://github.com/RaviRamDhali/programming-procedure/tree/master/Snippets/ASP

+1
source share

Good Ravi Ram! But ... if the form is of type enctype = multipart / form-data? Upload.Form.Key exists? thanks

0
source share

All Articles