HttpUtility does not exist in the current context
SLaks has the right answer... but let me be a bit more specific for people, like me, who are annoyed by this and can't find it right away :
Project -> Properties -> Application -> Target Framework -> select ".Net Framework 4"
the project will then save and reload.
You're probably targeting the Client Profile, in which System.Web.dll
is not available.
You can target the full framework in project's Properties.
You need to add the System.Web
reference;
- Right click the "Reference" in the Solution Explorer
- Choose "Add Reference"
- Check the ".NET" tab is selected.
- Search for, and add "System.Web".