Reputation: 11
In the following code:
for (int line = 0; line < CHUNKSTOBEFOUND; line++) {
nvc.Add ("search", System.Web.HttpUtility.UrlEncode (stringsToSearchFor[line]));
}
I get told namespace name HttpUtility does not exist. http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx seems to indicate I should use System.Web. I've tried using that, but I STILL get the error. Is there something else I'm supposed to include or use?
Upvotes: 0
Views: 2777
Reputation: 23675
As competent_said, you are probably targeting the Client Profile
in your project, in which System.Web.dll is not available. You can target the full framework in Project Properties to get it back working.
Another possible cause could be that you are not referencing System.Web
library. To do so:
Maybe you are just missing an using directive using System.Web;
on the top of your source file.
Upvotes: 2
Reputation: 44931
You are most likely using the Client Profile version of the .Net framework. You need to open your project properties and change the framework version to the full version.
Upvotes: 1