.NET Framework 4.6 and 4.5
Encodes a string for reliable HTTP transmission from the Web server to a client through the URL.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
is a convenient way to access the HttpUtility.UrlEncode method at run time from an ASP.NET application. Internally, UrlEncode uses HttpUtility.UrlEncode to encode strings.
To encode or decode values outside of a web application, use the WebUtility class.