I would recommend Uri.EscapeDataString instead of using HttpUtility functions. See discussion in Server.UrlEncode vs. HttpUtility.UrlEncode.
More Related Contents:
- Encode string URL without using HttpServerUtility [duplicate]
- How can I detect the encoding/codepage of a text file
- How to build a query string for a URL in C#?
- Get URL parameters from a string in .NET
- Path.Combine for URLs?
- How to check whether a string is a valid HTTP URL?
- C# Convert string from UTF-8 to ISO-8859-1 (Latin1) H
- Does C# have an equivalent to JavaScript’s encodeURIComponent()?
- Retrieve current URL from C# windows forms application
- WCF HttpTransport: streamed vs buffered TransferMode
- Accessing static fields in XAML
- System.Net.Mail and =?utf-8?B?XXXXX…. Headers
- prime number takes 0 arguments issue [closed]
- Tips for optimizing C#/.NET programs [closed]
- How to determine if a type implements a specific generic interface type
- Deserializing XML to Objects in C#
- Is it possible to do .NET binary serialization of an object when you don’t have the source code of the class?
- MS Dynamics CRM online 2011 – Authentication issues
- Code to validate SQL Scripts
- How to make a shallow copy of an array?
- Check if a property exists in a class
- Why we need Properties in C#
- How can I display a loading control while a process is waiting for be finished?
- Linq Query Group By and Selecting First Items
- How can I dynamically switch web service addresses in .NET without a recompile?
- Tag helper not being processed in ASP.NET Core 2
- Monitor child processes of a process
- List the IP Address of all computers connected to a single LAN
- Writing a Header using CsvHelper? C#
- Get first element from a dictionary