Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Request all Variables
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

JJenson
Advanced Member

USA
2121 Posts

Posted - 01 October 2007 :  12:08:26  Show Profile  Visit JJenson's Homepage
IS there a way to request all variables being sent in .asp

I know if php you can do something like $key = >val and this will display all the values. Just wanting to do the same in .asp

Thanks

Jeff

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 October 2007 :  12:15:55  Show Profile
Do you mean what's being posted using a form or the server variables, etc.?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 01 October 2007 :  12:19:25  Show Profile  Visit JJenson's Homepage
Yeah its being posted via a form and I want it to display all the value names so I know all the values that are being passed.

basically I want any value that is being passed to this page to be displayed. i.e. Form Server Variables Sessions all of it.

Does this makes sense?
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 October 2007 :  12:25:13  Show Profile
for each field in request.form
	response.write	field&": "request.form(field)
next

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 01 October 2007 :  12:26:49  Show Profile  Visit JJenson's Homepage
Thanks will give it a try
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 01 October 2007 :  12:39:57  Show Profile  Visit JJenson's Homepage
Sorry I know I am doing something really dumb but when I put this script in it gives me this error.

Expected end of statement

/forum/file_redirect.asp, line 68

response.write field&": "request.form(field)


I will be embarressed by the answer I am sure.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 October 2007 :  12:46:53  Show Profile
Nope, my bad; there should be an ampersand before the request.form(field).


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 01 October 2007 :  12:52:23  Show Profile  Visit JJenson's Homepage
Ok just wondering if this would be this script not working or if no values are being passed? But I get nothing displaying at all with this code:

for each field in request.form
response.write field&": " & request.form(field)
next
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 04 October 2007 :  10:35:28  Show Profile  Send pdrg a Yahoo! Message
for each field in request.form()
response.write field & ": " & request.form(field) & "<br />"
next

Try that - can't test it, I'm afraid, but it may help!
Changes are... spaces in the response.write, plus added a BR to line wrap, and a () after the request.form in the first line - not sure if that's required in this case to return the object reference properly
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 04 October 2007 :  14:27:51  Show Profile
A different approach is to just do
Response.Write Request.Form
That will just dump all the values to the page.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 04 October 2007 :  19:17:14  Show Profile  Visit JJenson's Homepage
Sorry forgot to post back I figured out why the values were not passing back Shaggy's script worked but thanks for the other suggestions cause they are very helpful while I am trying to increase what Iknow
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 05 October 2007 :  11:18:48  Show Profile  Send pdrg a Yahoo! Message
Feel the love ;-)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07