Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# replace command
Message
 
 
To
16/01/2008 10:21:24
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01282218
Message ID:
01282228
Views:
9
>Naomi,
>Maybe try to break it up a little to debug. Something like so (this is in VB):
>
>
>Dim x As String
>x = "I'm a boy"
>x = Server.URLEncode(x)
>x = x.Replace("'","\'")
>
>
>View x after every line. Does this help at all?

No, I've tried. The Replace doesn't work. I believe it's because the first character is a character (char), but the second is a string. In my case I need to replace string (1 char) with 2 chars.

Do you know any other method before I try to search online?

I did try in the immediate window a simple replace and it's not working. Or may be because \ is a special character. I'll play with other chars instead, but I really need \.

Perhaps I need to use chr() of what is the ascii of \ and is it CHR() in C#?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform