Sharunas Bielskis Sharunas Bielskis - 5 months ago 56
C# Question

How to UrlEncode symbols ( and )

I use System.Net.WebUtility.UrlEncode(myString) to UrlEncode string and get encoded string in uppercase tags after encoding (I found solution .net UrlEncode - lowercase problem). But problem what left for me ar ( and ) encoding. In this case both symbols left uncoded when I need %28 and %29 code instead them. How to solve this problem?


I used this:

myString = myString.Replace("(", "%28").Replace(")", "%29");