I have a URL in which I am trying to grab its querystring. Its format
looks like this:

http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
ge.asp?topic=45&subject=180

My code snippet below:

sURL = Request.QueryString("theUrl")
Response.Write sURL

Gives me this:
http://www.otherdomain.com/otherpage.asp?topic=45

How can I get the whole link (including the &subject=180)?





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: Request.Querystring? by Curt_C

Curt_C
Thu Mar 03 16:05:51 CST 2005

those are technically seperate QS values. You need to format the value
BEFORE you put it in there, with an encode, or else you need to tell the
Request to get the entire QS, dont specify the value, but this wont work if
you need multiple values.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"John ." <jrp210@yahoo.com> wrote in message
news:OlcVYvDIFHA.2984@TK2MSFTNGP15.phx.gbl...
>I have a URL in which I am trying to grab its querystring. Its format
> looks like this:
>
> http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
> ge.asp?topic=45&subject=180
>
> My code snippet below:
>
> sURL = Request.QueryString("theUrl")
> Response.Write sURL
>
> Gives me this:
> http://www.otherdomain.com/otherpage.asp?topic=45
>
> How can I get the whole link (including the &subject=180)?
>
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Re: Request.Querystring? by Hal

Hal
Thu Mar 03 16:49:59 CST 2005


"John ." <jrp210@yahoo.com> wrote in message
news:OlcVYvDIFHA.2984@TK2MSFTNGP15.phx.gbl...
> I have a URL in which I am trying to grab its querystring. Its format
> looks like this:
>
> http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
> ge.asp?topic=45&subject=180
>
> My code snippet below:
>
> sURL = Request.QueryString("theUrl")
> Response.Write sURL
>
> Gives me this:
> http://www.otherdomain.com/otherpage.asp?topic=45
>
> How can I get the whole link (including the &subject=180)?

If you want it all, just access the whole querystring:
Response.write Request.QueryString
I like your example *** a querystring with a URL with a querystring ;-)
that's almost recursive



Re: Request.Querystring? by jeff

jeff
Thu Mar 03 17:02:34 CST 2005

On Thu, 03 Mar 2005 13:56:23 -0800, John . <jrp210@yahoo.com> wrote:

>I have a URL in which I am trying to grab its querystring. Its format
>looks like this:
>
>http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
>ge.asp?topic=45&subject=180
>
>My code snippet below:
>
> sURL = Request.QueryString("theUrl")
> Response.Write sURL
>
>Gives me this:
>http://www.otherdomain.com/otherpage.asp?topic=45
>
>How can I get the whole link (including the &subject=180)?

You can't easily. The rest isn't part of "theURL" since it's part of
"subject" in your querystring. The ampersand (&) is a demarcation for
the querystring argument.

Jeff

Re: Request.Querystring? by Evertjan

Evertjan
Thu Mar 03 17:55:31 CST 2005

John . wrote on 03 mrt 2005 in microsoft.public.inetserver.asp.general:

> http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
> ge.asp?topic=45&subject=180
>
> My code snippet below:
>
> sURL = Request.QueryString("theUrl")
> Response.Write sURL
>

http://www.domain.com/page.asp?
theURL=http://www.otherdomain.com/otherpage.asp?topic=45^subject=180

----

URL = replace(request.QueryString("theUrl"),"^","&")
Response.Write sURL



--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


Re: Request.Querystring? by PiGei

PiGei
Mon Mar 07 05:13:09 CST 2005

"John ." <jrp210@yahoo.com> wrote in message
news:OlcVYvDIFHA.2984@TK2MSFTNGP15.phx.gbl
> I have a URL in which I am trying to grab its querystring. Its
> format looks like this:
>
>
http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
> ge.asp?topic=45&subject=180
>
> My code snippet below:
>
> sURL = Request.QueryString("theUrl")
> Response.Write sURL
>
> Gives me this:
> http://www.otherdomain.com/otherpage.asp?topic=45
>
> How can I get the whole link (including the &subject=180)?

http://www.domain.com/page.asp?theURL=<%=Server.URLEncode("http://www.otherdomain.com/otherpage.asp?topic=45&subject=180")%>

bye
PGei



Re: Request.Querystring? by Mark

Mark
Mon Mar 07 09:58:54 CST 2005

The original link must URL encode the "&" before "subject". As far a the
server can tell the link has 2 parameters, "theURL" and "subject".

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"PiGei" <james_milanNOSPAM@hotmail.com> wrote in message
news:OMu0kawIFHA.904@tk2msftngp13.phx.gbl...
> "John ." <jrp210@yahoo.com> wrote in message
> news:OlcVYvDIFHA.2984@TK2MSFTNGP15.phx.gbl
> > I have a URL in which I am trying to grab its querystring. Its
> > format looks like this:
> >
> >
> http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
> > ge.asp?topic=45&subject=180
> >
> > My code snippet below:
> >
> > sURL = Request.QueryString("theUrl")
> > Response.Write sURL
> >
> > Gives me this:
> > http://www.otherdomain.com/otherpage.asp?topic=45
> >
> > How can I get the whole link (including the &subject=180)?
>
>
http://www.domain.com/page.asp?theURL=<%=Server.URLEncode("http://www.otherdomain.com/otherpage.asp?topic=45&subject=180")%>
>
> bye
> PGei
>
>