[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Passing Multiple Variables with a Response.Redirect

Posted on 2006-07-21
3
Medium Priority
?
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

650 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