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) |
Returns an HTML-encoded string that represents the specified object by using a minimal encoding that is suitable only for HTML attributes that are enclosed in quotation marks. |
AttributeEncode(String) |
Returns an HTML-encoded string that represents the specified string by using a minimal encoding that is suitable only for HTML attributes that are enclosed in quotation marks. |
AttributeEncode(Object)
Returns an HTML-encoded string that represents the specified object by using a minimal encoding that is suitable only for HTML attributes that are enclosed in quotation marks.
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
An HTML-encoded string that represents the object.
Applies to
AttributeEncode(String)
Returns an HTML-encoded string that represents the specified string by using a minimal encoding that is suitable only for HTML attributes that are enclosed in quotation marks.
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
An HTML-encoded string that represents the original string.