Haim Bender Haim Bender - 11 months ago 56
C# Question

How do I replace all the spaces with %20 in C#

I want to make a string into a URL using C#, there must be something in the .NET framework that should help, right?.

Answer Source

I believe you're looking for HttpServerUtility.UrlEncode.

System.Web.HttpUtility.UrlEncode(string url)