|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Request.Querystring?
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! 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. Show quote "John ." <jrp***@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!
Show quote
"John ." <jrp***@yahoo.com> wrote in message If you want it all, just access the whole querystring: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)? Response.write Request.QueryString I like your example *** a querystring with a URL with a querystring ;-) that's almost recursive On Thu, 03 Mar 2005 13:56:23 -0800, John . <jrp***@yahoo.com> wrote:
Show quote >I have a URL in which I am trying to grab its querystring. Its format You can't easily. The rest isn't part of "theURL" since it's part of>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)? "subject" in your querystring. The ampersand (&) is a demarcation for the querystring argument. Jeff John . wrote on 03 mrt 2005 in microsoft.public.inetserver.asp.general:
> http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa http://www.domain.com/page.asp?> ge.asp?topic=45&subject=180 > > My code snippet below: > > sURL = Request.QueryString("theUrl") > Response.Write sURL > 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) "John ." <jrp***@yahoo.com> wrote in message
http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa
news:OlcVYvDIFHA.2984@TK2MSFTNGP15.phx.gbl > I have a URL in which I am trying to grab its querystring. Its > format looks like this: > > > ge.asp?topic=45&subject=180
http://www.domain.com/page.asp?theURL=<%=Server.URLEncode("http://www.otherdomain.com/otherpage.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)? bye PGei The original link must URL encode the "&" before "subject". As far a the
server can tell the link has 2 parameters, "theURL" and "subject". Show quote "PiGei" <james_milanNOSPAM@hotmail.com> wrote in message http://www.domain.com/page.asp?theURL=<%=Server.URLEncode("http://www.otherdomain.com/otherpage.asp?topic=45&subject=180")%>news:OMu0kawIFHA.904@tk2msftngp13.phx.gbl... > "John ." <jrp***@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)? > > Show quote > > bye > PGei > > |
|||||||||||||||||||||||