473,396 Members | 1,805 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,396 software developers and data experts.

form field cutting off querystring



I have the following link:
http://foo.com/accountlogin.asp?refe...=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?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 1535
"Joey Martin" wrote in message news:OP**************@TK2MSFTNGP10.phx.gbl...
:
:
: I have the following link:
: http://foo.com/accountlogin.asp?refe...=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
Jul 19 '05 #2
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")

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Joey Martin" <jo**@infosmiths.net> wrote in message
news:OP**************@TK2MSFTNGP10.phx.gbl...


I have the following link:
http://foo.com/accountlogin.asp?refe...=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?

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

Jul 19 '05 #3
That seems to pass it all but it changes all the characters to gibberish
(to their character codes). Any ideas?

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

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

Similar topics

2
by: John Davis | last post by:
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the same, which is to return the value of the field?? ...
2
by: Colin Steadman | last post by:
Part No Description Quantity 45643 Random part 10 45678 Another Random part 7 98944 And another 1 <submit button> ...
10
by: Steve Benson | last post by:
Our regular programmer moved on. I'm almost clueless in Javascript/ASP and got the job of adapting existing code. In the page below, everything works until I added the function checkIt() to...
7
by: Utter Newbie | last post by:
Just wondeing if there is a way to keep from having a certain parameter sent when posting a form to another page (method=get)... So as an example a page will post something like this from a form...
8
by: George | last post by:
VS.NET 2002/VB Is it possible to retrieve HTML form variables that are hidden input types using Request.QueryString() and/or Request.Form()? I have tried various ways of using those, but to no...
1
by: John | last post by:
Hi Is there an asp.net equivalent of the following code in the context of a form? for i = 1 to Request.Form.Count strMsgInfo = strMsgInfo & Request.Form.Key(i) & ": " & Request.Form.Item(i)...
4
by: Rob Meade | last post by:
Hi all, I have a page which displays some database results. On each column heading I have 2 images, an arrow up, and arrow down for my data sorting. The problem I have is that at the moment,...
5
by: Matt Jensen | last post by:
Howdy Am having a nightmare trying to do what seems should be simple. Following this article http://www.codeproject.com/aspnet/DataPassingBtPages.asp but getting an error 'Classname' is defined...
2
by: David | last post by:
I have a ASP.Net 2.0 page with a Gridview that contains a hyperlink column that takes me to a new page and puts value of ID into a querystring and it works fine. However, when I try to use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.