HtmlHelper.AttributeEncode HtmlHelper.AttributeEncode HtmlHelper.AttributeEncode Method

Definition

Overloads

AttributeEncode(Object) AttributeEncode(Object) AttributeEncode(Object)

Converts the specified attribute value to an HTML-encoded string.

AttributeEncode(String) AttributeEncode(String) AttributeEncode(String)

Converts the specified attribute value to an HTML-encoded string.

AttributeEncode(Object) AttributeEncode(Object) AttributeEncode(Object)

Converts the specified attribute value to an HTML-encoded string.

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

Parameters

value
Object Object Object

The object to encode.

Returns

The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string.

AttributeEncode(String) AttributeEncode(String) AttributeEncode(String)

Converts the specified attribute value to an HTML-encoded string.

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

Parameters

value
String String String

The string to encode.

Returns

The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string.

Applies to