[英]HttpUtility.UrlEncode Method Not Resolved
I used this Code in .net 3.5 我在.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."
效果很好,但是我已经在.NET 4.0下编译了该项目,并且给了我这个错误:
"The name 'HttpUtility' does not exist in the current context."
. 。
I added both System.Web
and System.Web.Extensions
references. 我添加了
System.Web
和System.Web.Extensions
引用。 This has not resolved 这还没有解决
this error.
这个错误。
将目标框架形式从.Net Framework 4 Client Profile
更改为.Net Framework 4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.