Dans ASP:Comment imiter ASP Server.URLEncode dans ASP.NET?
Server.URLEncode("+&(). -*<>/\|")
' returns %2B%26%28%29%2E+%2D%2A%3C%3E%2F%5C%7C
Dans ASP.NET
Uri.EscapeDataString("+&(). -*<>/\|")
// returns %2B%26().%20-*%3C%3E%2F%5C%7C
HttpUtility.UrlEncode("+&(). -*<>/\|")
// returns %2b%26().+-*%3c%3e%2f%5c%7c
est-il un moyen élégant comment mimer ancien comportement ASP dans ASP.NET?
Je ne peux pas appeler Regexp élégant mais je suppose que c'est mieux que je peux obtenir alors j'accepte. Merci. –