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

Spaces being removed from POST data

Using the HttpWebRequest to post data for a query, the input tag that
i'm mimicking is:

<input type "hidden" name="severity" value="'SEV 2', 'SEV 5'">

I'm using this for making the query via HttpWebRequest POST method:

.... & _
"&severity='SEV 2', 'SEV 5'" & _
.... & _

This returns an empty result set. Looking at the html that was returned,
I see this:

<input type="hidden" name="severity" value="'SEV2','SEV5'">

Why is it removing the spaces in my 'SEV 2', 'SEV 5' items?

I've tried using &nbsp; instead of the spaces, but that causes a server
error.

If I remove the severity property from the POST data, I get all the
records returned.

Can anyone shed some light on this?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 10 '07 #1
1 1831

Terry

You are probably not posting to the website but concate a request string

example : -)

http://www.google.nl/search?hl=nl&q=...G=Zoeken&meta=

a space is represented by %20 so this should solve your problem

However easier would be to perform a urlencode on the complete string , a
receiving webserver wil automaticly decode the string ( no extra code is
necesary )
regards

Michel
"Terry Olsen" <to******@hotmail.comschreef in bericht
news:uW*************@TK2MSFTNGP06.phx.gbl...
Using the HttpWebRequest to post data for a query, the input tag that
i'm mimicking is:

<input type "hidden" name="severity" value="'SEV 2', 'SEV 5'">

I'm using this for making the query via HttpWebRequest POST method:

... & _
"&severity='SEV 2', 'SEV 5'" & _
... & _

This returns an empty result set. Looking at the html that was returned,
I see this:

<input type="hidden" name="severity" value="'SEV2','SEV5'">

Why is it removing the spaces in my 'SEV 2', 'SEV 5' items?

I've tried using &nbsp; instead of the spaces, but that causes a server
error.

If I remove the severity property from the POST data, I get all the
records returned.

Can anyone shed some light on this?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***

Jan 10 '07 #2

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

Similar topics

3
by: Jason | last post by:
Here's the code I'm using: #################################### import os, string for root, dirs, files in os.walk('/home/_Comedy'): for file in files: str = os.path.dirname(file) print root,...
6
by: Nathan Sokalski | last post by:
I am using ASP to read code from a text file that I am displaying on my page. Because I do not want the code from the text file to be executed, I used the Server.HTMLEncode() method to display it...
1
by: Sergey Poberezovskiy | last post by:
Hi, I have a simple enumeration in my schema: <xs:element name="el_1"> <xs:simpleType> <xs:restiction base="xs:string"> <xs:enumeration value="value and space 1"/> <xs:enumeration...
14
by: Thelma Lubkin | last post by:
I am trying to limit the user's options to the choices offered by the combobox text, but I don't want this to extend to how he spaces out the text, e.g. 'abcdefg' and 'ab cd efg' should be...
11
by: gopal srinivasan | last post by:
Hi, I have a text like this - "This is a message containing tabs and white spaces" Now this text contains tabs and white spaces. I want remove the tabs and white...
0
by: mattdaddym | last post by:
Hi, I have an asp .net application that writes textboxes from a form into a sql database. The code is very simple. The .text property of the textbox is written to the database or loaded back....
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
2
by: David | last post by:
Sent this to alt.php a couple of days back, but doesn't look like I'll get an answer, so trying here. I'm trying to convert a script to use friendly URLs, I've done this before, but my PHP...
0
by: MLH | last post by:
In an earlier post today, it was mentioned that dbl-spaces caused alignment-justification problems when printing labels. I've never noticed this in reports except for those meant for the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.