[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Passing Multiple Variables with a Response.Redirect

Posted on 2006-07-21
3
Medium Priority
?
346 Views
Last Modified: 2010-04-17
Hello,

I've been searching how to pass multiple variables with a response.redirect for a little to long now and need some help.

I've tried this method
http://www.experts-exchange.com/Programming/Q_21248972.html?query=passing+multiple+variables+with+response.redirect&clearTAFilter=true

First let me start by explaining my madness

i have a form that "posts" the info to a page that checks against the dB for if it exists, then to either displaying the dB records or a page that informs the user the records exists and a button back to the form. On that page I want to be able to write the variables i'm passing, however i do a response.write on the query string of DateID and it will display that one but only that one if the "&" are next to the field name in the redirect as below

Response.redirect "add_projres_no.asp?DateID=" & ResDay & "&TimeID=" & ResTime & "&RoomID=" & ResRoom
output of request.querystring = 81

If i remove the "&" and the redirect is as below
Response.redirect "add_projres_no.asp?DateID=" & ResDay & "TimeID=" & ResTime & "RoomID=" & ResRoom
output of request.querystring = 81TimeID=16RoomID=12
0
Comment
Question by:thosrmann
3 Comments
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 1200 total points
ID: 17157472
thosrmann,

I am not positive I understand your question but Request.Querystring will only provide the variable you specify after that command.  For example in the querystring you had in the first code you would need to use the following line to get all of the variables in the string.

Request.Querystring("DateID")
Request.Querystring("TimeID")
Request.Querystring("RoomID")

One request would not work.  As you found in the second example if you leave out the ampersand (& sign) in the string then all of the information is treated as the value of DateID.  The ampersand is used to separate name/value pairs in the string.  For example,

?name1=value1&name2=value2&name3=value3

Let me know if you have any questions.  I think your problem will be solved by making the additional requests for the other "variables" in the string.  If you need more information or I misunderstood the problem just let me know how I can help.

b0lsc0tt
0
 
LVL 14

Assisted Solution

by:shahprabal
shahprabal earned 300 total points
ID: 17161950
You can also you a session variable to pass the value to the second page.
0
 
LVL 1

Author Comment

by:thosrmann
ID: 17168903
They both kinda answered by question, so thanks to both ill divide accordingly

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question