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
Public method 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 method 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.

See Also

Reference

HtmlHelper Class

System.Web.WebPages.Html Namespace