|
| |
|
|
chadb
Posts: 501 From: Kansas Status: offline
|
redirect values - 8/25/2009 11:41:50
I have a form that submits, on the form submit page it checks a database against one of the fiels, if it does not match I would like to redirect back to the form page. My question is, how can I pass a variable back. Can I pass a request.form on a response.redirect? Thanks, Chad
|
|
|
|
ou812
Posts: 1705 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: redirect values - 8/25/2009 12:43:25
I usually pass the variable(s) back in a query string. Something like: somestuff = request.form("yourstuff") Response.Redirect("somepage.asp?somevariable=" & somestuff) And then look for the querystring variables and do something accordingly.
_____________________________
-brian Black Holes suck. EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
chadb
Posts: 501 From: Kansas Status: offline
|
RE: redirect values - 8/25/2009 13:32:00
quote:
Response.Redirect("somepage.asp?somevariable=" & somestuff) OK, here is what I tried, please let me know where I am going wrong. Form page: <input type="text" name="T1" size="20" value="<%response.write somevariable %>"> Action Page: <% dim somevariable somestuff = "test" Response.Redirect("test.asp?somevariable=" & somestuff) %> but it does not work.
|
|
|
|
ou812
Posts: 1705 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: redirect values - 8/25/2009 16:03:36
Hmm, it looks okay. What is it or isn't it doing? When your on your test.asp page and check the contents what does it do, or not do? Or is it not getting to test.asp? eg. x=request.querystring("somevariable") response.write x
_____________________________
-brian Black Holes suck. EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
chadb
Posts: 501 From: Kansas Status: offline
|
RE: redirect values - 8/25/2009 16:08:45
OK, that worked. Thanks for the help.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|