I used this Code in .net 3.5
HttpUtility.UrlEncode("", new UTF8Encoding()).Replace('+', ' ');
which worked fine, but I have compiled the project under .NET 4.0 and it is giving me this error:
"The name 'HttpUtility' does not exist in the current context."
.
I added both System.Web
and System.Web.Extensions
references. This has not resolved this error.