PDA

View Full Version : response.redirect


Crash1hd
07-27-2003, 02:34 AM
I was wondering how I would go about putting a rs.fields("data") inside a response.redirect request for example

the following code works

Response.Redirect "Page.asp?MemorialID=1"

but I want the 1 to be the rs.fields("data") for example

Response.Redirect "Page.asp?MemorialID=response.write rs.fields("data") "

of course that wont work as it is not writing the response.write for some reason

is there a way to make this work!

if it helps the page that the code is in is the same page for example

www.website.com/Page.asp?MemorialID=1

oracleguy
07-27-2003, 02:51 AM
:confused: Why are you using response.write? Response.Redirect is a server side command, so there is no reason to write it to the client.

All you have to do is
Response.Redirect "Page.asp?MemorialID=" & rs.fields("data")

Simple as that.

Morgoth
07-27-2003, 09:43 PM
That's exactly it.
oracleguy has the answer, Crash1hd.

oracleguy
07-28-2003, 12:44 AM
Originally posted by Morgoth
That's exactly it.
oracleguy has the answer, Crash1hd.

Well of course... I am an Oracle after all. :D

Crash1hd
07-28-2003, 02:55 AM
Ok that works yet all I had to do was put the following to make it work

Response.Redirect "Page.asp?MemorialID=" & MemorialID


yet the trouble I am having now is that the page that I am trying to reload is the following

Page.asp?MemorialID=1&MemAlpha=1

but the problem is that the same link may chang depending on the predecending page so if the precending page is

memalpha.asp?dbshow=1&MemorialID=1

then the page above would be correct except that if the page is

membeta.asp?dbshow=1&MemorialID=1

then it would be

Page.asp?MemorialID=1&Membeta=1

Ext...

so how would I make the reload work?

glenngv
07-28-2003, 03:16 AM
If I followed you correctly...

in memalpha.asp:

Response.Redirect "Page.asp?MemorialID=" & rs.fields("data") & "&MemAlpha=1"


in membeta.asp:

Response.Redirect "Page.asp?MemorialID=" & rs.fields("data") & "&MemBeta=1"

Crash1hd
07-28-2003, 05:01 PM
Ok Got it all figured out Figures as always post the question and then figure out the problem anyhow but dont post the question and take weeks trying to figure it out lol :)