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

String returns wrong value

Hi in my web app i construct an XML file for menu handling.
Since some days now the value returned is differend then before,
When i take a look at the xml the values for \ are included.

I performe some of this code:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
content += "<Item " +
(row["Label"] != System.DBNull.Value ? "Label=" + "\"" +
row["Label"].ToString() + "\" " : "") +
(row["Image"] != System.DBNull.Value ? "Image=\"" + row["Image"].ToString()
+ "\" " : "") +
(row["Image2"] != System.DBNull.Value ? "ImageOver=\"" +
row["Image2"].ToString() + "\" " : "") +
(row["Image2"] != System.DBNull.Value ? "Image2=\"" +
row["Image2"].ToString() + "\" " : "") +
(row["ImagePosition"] != System.DBNull.Value ? "ImagePosition=\"" +
row["ImagePosition"].ToString() + "\" " : "") +
(row["State"] != System.DBNull.Value ? "State=\"" + row["State"].ToString()
+ "\" " : "") +
(row["Href"] != System.DBNull.Value ? "Href=\"" + row["Href"].ToString() +
"\" " : "") +
(row["Target"] != System.DBNull.Value ? "Target=\"" +
row["Target"].ToString() + "\" " : "") +
(row["Enabled"] != System.DBNull.Value ? "Visible=\"" +
(row["Enabled"].ToString() == "1" ? "True" : "False") + "\" " : "") +
" >";
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Each time i use "\"" to include an " in the text an \" is returned.
Can annyone help me on this one.
Regards,
Rene
Nov 16 '05 #1
2 1508
RJDev <rj*******@hotmail.com> wrote:
Hi in my web app i construct an XML file for menu handling.
Since some days now the value returned is differend then before,
When i take a look at the xml the values for \ are included.


See http://www.pobox.com/~skeet/csharp/s....html#debugger

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Thnx Jon,
This got me a lot further.
Regards,
Rene

"Jon Skeet [C# MVP]" <sk***@pobox.com> schreef in bericht
news:MP************************@msnews.microsoft.c om...
RJDev <rj*******@hotmail.com> wrote:
Hi in my web app i construct an XML file for menu handling.
Since some days now the value returned is differend then before,
When i take a look at the xml the values for \ are included.


See http://www.pobox.com/~skeet/csharp/s....html#debugger

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #3

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

Similar topics

2
by: Fuzzyman | last post by:
I recently went through a bit of a headache trying to subclass string.... This is because the string is immutable and uses the mysterious __new__ method rather than __init__ to 'create' a string....
1
by: john | last post by:
Relatively new to C coding, so any help would greatly be appreciated. I'm having problems try to return my string array from my parsing function. When I do a printf I am getting the correct value...
20
by: MLH | last post by:
120 MyString = "How many copies of each letter do you need?" 150 MyVariant = InputBox(MyString, "How Many?", "3") If MyVariant = "2" Then MsgBox "MyVariant equals the string '2'" If...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
24
by: MU | last post by:
Hello I have some code that sets a dropdownlist control with a parameter from the querystring. However, when the querystring is empty, I get an error. Here is my code: Protected Sub...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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.