473,409 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Adding variables to response.redirect

I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect "pagename.asp?isbn=" & rs("isbn"), however it is not
working and is stopping at the ?isbn=
and not adding the variable value. What can I do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?

Thank you,
Bill
Jul 19 '05 #1
3 12373
Bill wrote:
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect "pagename.asp?isbn=" & rs("isbn"), however it is not
working and is stopping at the ?isbn=
and not adding the variable value. What can I do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?

Your method has always worked for me. Please define "not working" and show
us the actual code that is "not working". (by "actual" I mean that your
example statement above would not work even if you weren't attempting to
concatenate a parameter to the url <grin> )

Bob Barrows
Jul 19 '05 #2
I'm not sure what isn't working for you. This should work. I personally
always use sRedirect and always redirect to a variable name. Like so:

Dim sRedirect
Select Case [something]
Case [something]
sRedirect = "page1.asp"
Case [somethingElse]
sRedirect = "page2.asp"
Case [AnotherCondition]
sRedirect = "page3.asp?isbn=" & rs.fields.item(0).value
Case Else
sRedirect = "page9.asp"
End Select

Response.Redirect sRedirect

Ray at work
"Bill" <bi***********@gospellight.com> wrote in message
news:8d**************************@posting.google.c om...
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect "pagename.asp?isbn=" & rs("isbn"), however it is not
working and is stopping at the ?isbn=
and not adding the variable value. What can I do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?

Thank you,
Bill

Jul 19 '05 #3
Check rs("isbn") for leading spaces. If so, either Trim(rs("isbn")) or
Server.URLEncode(rs("isbn"))

"Bill" <bi***********@gospellight.com> wrote in message
news:8d**************************@posting.google.c om...
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect "pagename.asp?isbn=" & rs("isbn"), however it is not
working and is stopping at the ?isbn=
and not adding the variable value. What can I do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?

Thank you,
Bill

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gary | last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like...
7
by: Anne | last post by:
hie there, i want to be able to pass multiple parameters to another page. currently, i am able to do so, but somehow i feel it is not the correct way to do it. below is part of what i have so far....
1
by: John | last post by:
Hi, I have a routine that sets some session variables and then redirects the user to another page in the same application/ same folder. ======= Session("MyName") = "Fredsmith"...
6
by: Keith Patrick | last post by:
I have to do some programmatic redirects (in several pages) based on URLs I am given from an external source. The URLs have querystrings at the end, but one in particular is about 240 chars long,...
10
by: Johnny Fugazzi | last post by:
I have a couple of pages that have started showing an odd problem. When the code calls Response.Redirect("file.aspx"), nothing happens. The page goes white, and the old URL and querystring are...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
0
by: Dornel | last post by:
Hi all, My session variables are lost when I using response.redirect at first time... In the second time, the problem not exists. example in page 1(create session and redirect): ...
3
by: TCook | last post by:
I am losing my session variables after a Response.Redirect. My web.config file contains the following: <sessionState mode="InProc" stateConnectionString="tcipip=127.0.0.1:42424"...
12
by: gigi | last post by:
How to send more than one value using response redirect? For example i can send one like this response.Redirect "pregled.asp?ime=" & strUserName but how to send two or more values? I tried...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.