form field cutting off querystring

R

Roland Hall

in message :
:
: I have the following link:
: http://foo.com/accountlogin.asp?refer=contactform.asp?toid=101&itemid=9&
: itemtype=horse
:
: a form field that should read the refer=querystring cuts off after the
: toid=101. I assume that because I have
: referpage=request.querystring("refer")
:
: Is there any way to make it read the entier section after refer= and not
: stop and the variable?

Try...

referpage = Server.URLEncode(Request.QueryString("refer"))

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
A

Aaron Bertrand - MVP

You're going to have mixed results on different browsers and platforms
trying to pass two question marks in the URL like that. I suggest using
Server.URLEncode on the first page, before you pass it across.

Response.Redirect "accountlogin.asp?refer=" &
Server.URLEncode("contactform.asp?toid=101&itemid=9&itemtype=horse")

The Unencode will happen automatically when you retrieve
Request.QueryString("refer")
 
J

Joey Martin

That seems to pass it all but it changes all the characters to gibberish
(to their character codes). Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top