HtmlHelper.AttributeEncode Method
Include Protected Members
Include Inherited Members
Returns an HTML-encoded string using a minimal encoding that is suitable only for HTML attributes that are enclosed in quotation marks.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
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. |
Top
Remarks
Minimal HTML-encoding converts only double-quotation ("), ampersand (&), and less-than (<) characters to their corresponding HTML escape sequences. This is faster than full HTML encoding, but is suitable only for encoding HTML attributes that are in double quotation marks.