I need to move .NET code to the Compact Framework. That code uses HttpUtility.UrlEncode to encode query parameters, but System.Web isn't available on CF. What can I use instead?
UrlEncode(String, Encoding) Encodes a URL string using the specified encoding object.
HttpUtility is an open source MIT license project which is helpful in making HTTP requests and returns a decoded object from server.
Use Uri.EscapeDataString. It's nearly equivalent, and probably better anyway, and is included in NetCF.
More info on their differences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With