The name 'HttpUtility' does not exist in the current context

I was doing UrlEncode with the HttpUtility library of C# and getting the below error. My .Net version is 3.5;

The name 'HttpUtility' does not exist in the current context

I have resolved this issue by adding the reference of System.Web from Add Reference option(Right click on References -> Add Reference).

Comments