Another way of doing this is using Uri.EscapeUriString(stringToEscape)
.
More Related Contents:
- Encode string URL without using HttpServerUtility [duplicate]
- How to build a query string for a URL in C#?
- URL Encoding using C#
- Get URL parameters from a string in .NET
- How to download a file from a URL in C#?
- A potentially dangerous Request.Path value was detected from the client (*)
- Path.Combine for URLs?
- Code for decoding/encoding a modified base64 URL (in ASP.NET Framework)
- How to check whether a string is a valid HTTP URL?
- URL-encoded slash in URL
- How do I decode a URL parameter using C#?
- Retrieve current URL from C# windows forms application
- Get host domain from URL?
- How to download image from URL
- How to get full host name + port number in Application_Start of Global.aspx?
- Route parameter with slash “/” in URL
- How do you UrlEncode without using System.Web?
- Getting absolute URLs using ASP.NET Core
- How can I dynamically switch web service addresses in .NET without a recompile?
- How can I get URLs of open pages from Chrome and Firefox?
- Encoding parameters for a URL
- ASP.NET MVC – Routing – an action with file extension
- C# regex pattern to extract urls from given string – not full html urls but bare links as well
- How can I parse HTTP urls in C#?
- URL Encode and Decode in ASP.NET Core
- How to change the port number for Asp.Net core app?
- Get specific subdomain from URL in foo.bar.car.com
- Export DataTable to Excel with EPPlus
- determine if file is an image
- How can I unmask password text box and mask it back to password?