HttpUtility.HtmlEncode Method (Object)

.NET Framework (current version)

Converts an object's string representation into an HTML-encoded string, and returns the encoded string.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

static member HtmlEncode : 
        value:Object -> string


Type: System.Object

An object.

Return Value

Type: System.String

An encoded string.

To encode or decode values outside of a web application, use the WebUtility class.

.NET Framework
Available since 4.0
Return to top