Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# replace command
Message
 
 
To
16/01/2008 11:01:31
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:
01282268
Views:
7
>C# sees the \ as an escape character. Try:
>Server.UrlEncode(strPageTitle).Replace("'", @"\'");
>
>or
>
>Server.UrlEncode(strPageTitle).Replace("'", "\\'");
>
>
Both cases produced \\ instead of a single \. But we're getting closer, thanks.

I'm thinking about using chr() instead. Would you please help with a syntax?

It should not be that hard a thing to replace a single quote with a \ and a single quote.
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