Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpServerUtility.UrlEncode Method

Encodes a string for reliable HTTP transmission from the Web server to a client through the URL.

Name Description
HttpServerUtility.UrlEncode (String) URL-encodes a string and returns the encoded string.
HttpServerUtility.UrlEncode (String, TextWriter) URL-encodes a string and sends the resulting output to a TextWriter output stream.

UrlEncode is a convenient way to access the System.Web.HttpUtility.UrlEncode method at run time from an ASP.NET application. Internally, UrlEncode uses System.Web.HttpUtility.UrlEncode to encode strings.

Community Additions

© 2015 Microsoft