Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# replace command
Message
 
 
À
16/01/2008 11:19:29
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01282218
Message ID:
01282281
Vues:
8
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform