How to UrlDecode without having System.Web dll in c#
Asked Answered
K

1

7

I'm about to create a self-hosted Web API application, and somewhere I need to URL Decode the input. But I truly don't want to add a reference to System.Web.dll, because AMAIK, it's a heavy DLL and one of the main reasons of getting far from ASP.NET and IIS.

If I'm right, and I don't add a reference to System.Web, then how can I URL Decode effectively without bugs?

Keelby answered 23/1, 2016 at 13:52 Comment(1)
Please look at the answers to #1405548Staples
I
11

//.Net 4.0+

you can use WebUtility.UrlDecode(). It is not part of system.web.

And you can see this blog: Html and Uri String Encoding without System.Web

Incessant answered 24/1, 2016 at 15:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.