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

Visual C++ using "&" as a string...

I am trying to pass a URL to the body of an e-mail using a shell...however the string I am trying to pass as the URL contains a "&" character which is being treated as an operator by the complier and it is cutting off everything after it...is there any way to get the compiler to treat the character as any other string character so it can pass the whole string?

please help
Jan 23 '08 #1
6 1756
RedSon
5,000 Expert 4TB
I am trying to pass a URL to the body of an e-mail using a shell...however the string I am trying to pass as the URL contains a "&" character which is being treated as an operator by the complier and it is cutting off everything after it...is there any way to get the compiler to treat the character as any other string character so it can pass the whole string?

please help
Add an escape operator before you pass the URL?
Jan 23 '08 #2
Add an escape operator before you pass the URL?

I am totally not a V-C++ programmer...what is an escape operator?

Paul
Jan 23 '08 #3
RedSon
5,000 Expert 4TB
I am totally not a V-C++ programmer...what is an escape operator?

Paul
something like \" or \& or \\. I escape the special character status by putting a slash before the character that I want to escape from. For example path names to files are "\\Dir\\subdir\\file" and basically they appear to the machine as "\Dir\subdir\file"
Jan 23 '08 #4
something like \" or \& or \\. I escape the special character status by putting a slash before the character that I want to escape from. For example path names to files are "\\Dir\\subdir\\file" and basically they appear to the machine as "\Dir\subdir\file"
URLString = "http://www.expocadweb.com/07demo/ec/forms/ attendee/indexSales.aspx?content=floorPlan\\&boothdata="

URLString = URLString & TotalBoothStr & HighlightStr

mailstr = "mailto:" & Trim(Email.Text) & "?" & "Body=" & URLString


this is what Im trying...and it is still ending the string that goes into the body at
floorPlan\\ ....however the "\\" is in the string...
Jan 23 '08 #5
RedSon
5,000 Expert 4TB
What datatype is your URLString?
Jan 23 '08 #6
I figured it out...if we replace the & with %26 (the ascii translation) it works...
Jan 23 '08 #7

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

Similar topics

1
by: David Furey | last post by:
Hi I have an XML documnet and a XSLT document as shown below THe XSLT document brings back a filtered docmument that has the VendorName that starts with a particular sub-string This works as...
5
by: Michael Hill | last post by:
I have a general question about how people generally tend to deal with users data that they enter. As an example users enter double quotes in a text field surrounding a specific piece of text...
2
by: Eric Osman | last post by:
Hi, I'm looking for a javascript function that will convert input such as this: <CLUB Code=" into this: &lt;CLUB Code=&quot;
4
by: barney | last post by:
Hello, I' m using .NET System.Xml.XmlDOcument. When I do the following: XmlDocument xml = new XmlDocument(); xml.Load("blah"); .... xml.Save("blub"); I've got the problem that the following...
5
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this <Addresses> <Address>&qout;Somebody's Name&quot;...
12
by: Tee | last post by:
String Builder & String, what's the difference. and when to use which ? Thanks.
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
13
by: Ragnar | last post by:
Hi, 2 issues left with my tidy-work: 1) Tidy transforms a "&amp;" in the source-xml into a "&" in the tidied version. My XML-Importer cannot handle it 2) in a long <title>-string a wrap is...
1
by: Amith | last post by:
Here we are facing a problem which is when we pass a parameter to javascript putting '&' . Ex: &contact. In Japanese OS when we receive this parameter in the script '&' is converted to 'e'.So...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.