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

losing characters passing a string in ASP passing

Hello reader,

On my site i pass variables from one page to another, this is no problem. But when i'll get a string with a + or & sign for example this NE SO 1.1 + 1.2 string I will lose the + sign when I'll pass it from one page to another. I will get NE SO 1.1 1.2 this result when I'll pass it from one page to another. Even if I do this with the following simple code I will get the same result:
FILE : SENDING.ASP
Expand|Select|Wrap|Line Numbers
  1. <%
  2.     name2 = "NE SO 1.1 + 1.2"
  3. %> 
  4. <a href="t3.asp?name=<%=name2%>" target="frameInfo" > link</a> 
FILE : GETTING.ASP
Expand|Select|Wrap|Line Numbers
  1. <%
  2.     gotname = request.querystring("name")
  3. %>
also then I will lose the + sign and will end with this result:
NE SO 1.1 1.2

Can someone give me a hind to avoid losing these signs?!
Sep 20 '08 #1
2 1768
Krandor
50
If I understand your question correctly, you are passing those values through a query and you are losing those two chracters in the process.

I don't know about the + sign but the & is used in parts of the query to designate the next variable so you are confusing it when it is part of the data.

If you are sending the query to another of your pages, you could use session variables with the whole text instead. If not, you will have to remove the offending characters before you send the query.
Sep 21 '08 #2
jhardman
3,406 Expert 2GB
Those are both protected characters in querystrings. You can either use <%=server.urlEncode(name2)%> (this should work, but I think I have seen some bugs or holes in the implementation) or you can send them as form inputs instead. I could help you code that if you would like.

Jared
Sep 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ,hj | last post by:
From: ",hj" <webmaster@mail.com> Subject: Losing random characters in HTML email Date: 28 November 2003 17:21 I've narrowed down my code as much as I can so that I can show you this bug. The...
10
by: huzz | last post by:
I have web application that quaries the Active Directory to get user details.. everything works fine but someday I'll get System.Runtime.InteropServices.COMExection and if I restart the client...
35
by: David Mathog | last post by:
Every so often one of my fgets() based programs encounters an input file containing embedded nulls. fgets is happy to read these but the embedded nulls subsequently cause problems elsewhere in...
9
by: Bert Szoghy | last post by:
Hello, I am struggling with an extended stored procedure DLL coded in C. The SQL Server database contains French accented characters. The DLL drops them as it passes on the data to managed code....
4
by: Stephen | last post by:
I have a .NET (1.1 framework) application that is losing a session variable on only a few PC's. The main page is loading up in a frame in a Portal application. On the Page_Load it stores an...
11
by: anony | last post by:
Hello, I can't figure out why my parameterized query from an ASP.NET page is dropping "special" characters such as accented quotes & apostrophes, the registered trademark symbol, etc. These...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
2
by: joakim.hove | last post by:
Hello, I am having great problems writing norwegian characters æøå to file from a python application. My (simplified) scenario is as follows: 1. I have a web form where the user can enter his...
4
by: Jonathan | last post by:
Hi, Can you please tell me how can I printf 'n' characters of from a char* to a file. I notice there is a snprinf, but I don't see one corresponding to fprintf? I am thinking if i can do...
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?
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
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:
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
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.