Share via


HtmlHelper.Encode Method

Definition

Overloads

Encode(Object)

Converts the value of the specified object to an HTML-encoded string.

Encode(String)

Converts the specified string to an HTML-encoded string.

Encode(Object)

Converts the value of the specified object to an HTML-encoded string.

public string Encode (object value);
member this.Encode : obj -> string
Public Function Encode (value As Object) As String

Parameters

value
Object

The object to encode.

Returns

The HTML-encoded string.

Applies to

Encode(String)

Converts the specified string to an HTML-encoded string.

public string Encode (string value);
member this.Encode : string -> string
Public Function Encode (value As String) As String

Parameters

value
String

The string to encode.

Returns

The HTML-encoded string.

Applies to