HtmlHelper.AttributeEncode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AttributeEncode(Object) |
Converts the specified attribute value to an HTML-encoded string. |
AttributeEncode(String) |
Converts the specified attribute value to an HTML-encoded string. |
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
The object to encode.
Returns
The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string.
Applies to
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
The string to encode.
Returns
The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string.