Solved

Passing Multiple Variables with a Response.Redirect

Posted on 2006-07-21
3
310 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 400 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 100 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

770 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