gasroot
gasroot

Reputation: 523

HttpUtility.UrlEncode Method Not Resolved

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 resolvedenter image description here this error.

Upvotes: 0

Views: 724

Answers (1)

I4V
I4V

Reputation: 35363

Change target framework form .Net Framework 4 Client Profile to .Net Framework 4

Upvotes: 3

Related Questions