Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# replace command
Message
 
 
To
16/01/2008 11:19:29
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:
01282281
Views:
7
>Maybe I did not understand, is this what you want?
>
>string x = "I'm a girl";
>x = Server.UrlEncode(x).Replace("'", "\\'"));
>
>returns: "I\'m+a+girl"
>
>Craig is correct, you need to escape the backslash in C#.

For me it was returning \\, but I'm running the full test again right now. I put @ in the replace command and I'm going to test if it would work. I was getting \\ in the immediate window.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform