473,405 Members | 2,282 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,405 software developers and data experts.

Receiving '+' character in Request.Form

I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.

Any ideas?

Jul 4 '07 #1
5 2024
wrote on 04 jul 2007 in microsoft.public.inetserver.asp.general:
I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.
Not true!

Try:

=========== test.asp ===========

<% = request.form("t")%>

<form method='post'>
<input name='t' value='a+b+c'>
<input type='submit'>
</form>

================================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 4 '07 #2
fe*********@hotmail.com wrote:
I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.
Please post a simple page that reproduces the symptoms you are experiencing.
"+" characters should not be replaced.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 4 '07 #3
On Jul 4, 9:32 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
fergally...@hotmail.com wrote:
I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.

Please post a simple page that reproduces the symptoms you are experiencing.
"+" characters should not be replaced.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Thanks for you help. I tried that example and I see now that they
should not be replaced. I better explain in more detail what I'm
doing. I'm sending this request from a C++ application as follows.

pIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP.3. 0");
pIXMLHTTPRequest->open(_bstr_t(L"POST"), bstrurl, false);
pIXMLHTTPRequest->setRequestHeader("Content-Type", "application/x-www-
form-urlencoded");
pIXMLHTTPRequest->send("t=1+2+3");

I'm testing by writing to file on the server

fnameLicense.Write(Request("t"))

The file content is
1 2 3

I have examined what's being sent to the server using an ethernet
sniffer on the server and I can see t=1+2+3 in one of the packets
received. Anyone know what I'm missing?
Jul 5 '07 #4

<fe*********@hotmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
On Jul 4, 9:32 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
fergally...@hotmail.com wrote:
I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.
Please post a simple page that reproduces the symptoms you are
experiencing.
"+" characters should not be replaced.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Thanks for you help. I tried that example and I see now that they
should not be replaced. I better explain in more detail what I'm
doing. I'm sending this request from a C++ application as follows.

pIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP.3. 0");
pIXMLHTTPRequest->open(_bstr_t(L"POST"), bstrurl, false);
pIXMLHTTPRequest->setRequestHeader("Content-Type", "application/x-www-
form-urlencoded");
pIXMLHTTPRequest->send("t=1+2+3");

I'm testing by writing to file on the server

fnameLicense.Write(Request("t"))

The file content is
1 2 3

I have examined what's being sent to the server using an ethernet
sniffer on the server and I can see t=1+2+3 in one of the packets
received. Anyone know what I'm missing?
The + is using in URL encoding to encode a space.

Use %2B instead of +

"t=1%2B2%2B3"

Jul 5 '07 #5
On Jul 5, 11:04 am, "Anthony Jones" <A...@yadayadayada.comwrote:
<fergally...@hotmail.comwrote in message

news:11**********************@q69g2000hsb.googlegr oups.com...


On Jul 4, 9:32 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
fergally...@hotmail.com wrote:
I'm sending some data in a HTTP POST to an asp page. The data contains
some + characters. When I try to access the data using
Request.Form("data") I get the data but the + characters are replaced
by spaces.
Please post a simple page that reproduces the symptoms you are
experiencing.
"+" characters should not be replaced.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Thanks for you help. I tried that example and I see now that they
should not be replaced. I better explain in more detail what I'm
doing. I'm sending this request from a C++ application as follows.
pIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP.3. 0");
pIXMLHTTPRequest->open(_bstr_t(L"POST"), bstrurl, false);
pIXMLHTTPRequest->setRequestHeader("Content-Type", "application/x-www-
form-urlencoded");
pIXMLHTTPRequest->send("t=1+2+3");
I'm testing by writing to file on the server
fnameLicense.Write(Request("t"))
The file content is
1 2 3
I have examined what's being sent to the server using an ethernet
sniffer on the server and I can see t=1+2+3 in one of the packets
received. Anyone know what I'm missing?

The + is using in URL encoding to encode a space.

Use %2B instead of +

"t=1%2B2%2B3"- Hide quoted text -

- Show quoted text -
Thanks. That works for the example but the trouble is that I won't be
sending t=1%2B2%2B3 all the time. That was just an example. I'll be
sending something that is read from a file and I don't know whether or
not it contains any + chars.

I guess I could parse the string before hand and replace all
occurances of + with %2B but is there any other way?

Jul 5 '07 #6

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

Similar topics

5
by: Danny | last post by:
I am working on a project in which a number of client applications will be posting xml documents as a byte array to an ASP.NET page on our web server. I am trying to simulate the process and run...
0
by: Danny | last post by:
I am working on a project in which a number of client applications will be posting xml documents as a byte array to an ASP.NET page on our web server. I am trying to simulate the process and run...
8
by: nospam | last post by:
I have an piece of software that is sending an HTTP POST request to an ASP.Net page. The data posted consists of a chunk of XML data. For some reason (Based on my net research, and my tests at...
1
by: Piotrekk | last post by:
Hi. I receive XMLcontent codded in ISO-8859-1. XML file contains Polish character set so that i need to notice somehow when they are coming. My program cuts this characters and replaces them with...
5
by: Just D | last post by:
All, Any valuable idea about subj: "The '%' character, hexadecimal value 0x25" ? I tried to google, but nothing interesting was found. Is it IIS settings problem, user side problem or...
1
by: Subrato | last post by:
Hi, I am very new to xml and I have this piece of code which I took off a website. The situation is that on of the website, user files up a form and it is submitted. On submission, the page should...
0
by: therig | last post by:
I'm using the following code to send a welcome letter to a user after they've registered with their username/password. Everything seems to work, but when I test the registration with my squirrelmail...
1
by: stepby | last post by:
Hi All, I have use the ajax with the server side language ASP. I find the when passing the parameter with the chinese character, the chinese character cannot show orderly and become "wrong code" ....
3
by: Tarik Monem | last post by:
Hi Everyone, Still a newbie with FLEX, and I've passed arrays using AJAX to FLEX before, but I've never passed links to FLEX. Basically, this is the OUTPUT, which I wanted, but I'm given an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.