简体   繁体   中英

Add System.Web Reference To A Windows 10 Universal App

I download a project on Gitgub Basically is a Console Application. But I want to translate this C# Console Application to a Universal Windows App.

I want to use HttpUtility.UrlEncode in a windows 10 universal, but I can not find System.Web in .NET (Add Reference) How can I add this assembly to my project?

Error: The "HttpUtility" Does not existin the current context.

Im using Visual Studio 2015

I try with this question: How Add System.Web Reference To A Windows Form Application But doesnt work for the Universal 10 app.

Thanks in advance!

The System.Web assembly is a huge monolith that Microsoft themselves seem to be moving away from.

Usually, for any functionality found within System.Web , there's a modern equivalent that can be found elsewhere.

In this case, you'd be looking for WebUtility.UrlEncode instead, which is found in the System.Net assembly and is listed as supported on the Universal Windows Platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM