我在.NET 3.5HttpUtility.UrlEncode方法不解决
HttpUtility.UrlEncode("", new UTF8Encoding()).Replace('+', ' ');
后就正常使用此代码,但是我已经在.NET 4.0编译了该项目,它是给我这个错误: "The name 'HttpUtility' does not exist in the current context."
。
我加了System.Web
和System.Web.Extensions
参考文献。这还没有解决这个错误。
这类似于这样的问题http://stackoverflow.com/questions/15020802/httputility-does-not-exist-in-current-context-in-framework- 3-5,请确保你的目标是完整的框架,而不是客户端配置文件 – 2013-04-24 08:05:29