ListItemControlBuilder.HtmlDecodeLiterals 方法

定义

确定分析文本时,与 ListItem 关联的文本中的 HTML 实体是否转换为它们的等效字符。Determines whether HTML entities in the text associated with the ListItem are converted to their equivalent characters when the text is parsed.

public:
 override bool HtmlDecodeLiterals();
public override bool HtmlDecodeLiterals ();
override this.HtmlDecodeLiterals : unit -> bool
Public Overrides Function HtmlDecodeLiterals () As Boolean

返回

Boolean

所有情况下均为 truetrue for all cases.

注解

HtmlDecodeLiterals方法用于确定当分析文本时,与关联的文本中的 HTML 实体是否 ListItem 转换为其等效的字符。The HtmlDecodeLiterals method is used to determine whether HTML entities in the text associated with the ListItem are converted to their equivalent characters when the text is parsed. 此方法将重写方法的继承实现 ControlBuilder.HtmlDecodeLiterals 以始终返回 trueThis method overrides the inherited implementation of the ControlBuilder.HtmlDecodeLiterals method to always return true. 这表示与控件关联的文本中的 HTML 实体 ListItem 始终自动转换为其等效的纯文本字符。This indicates that HTML entities in the text associated with the ListItem control are always automatically converted to their equivalent, plain text characters.

备注

与关联的文本 ListItem 将呈现为 <option> HTML 元素的属性。The text associated with the ListItem is rendered as an attribute of the <option> HTML element. 当在客户端上呈现特性时,会自动将特殊字符转换为等效的 HTML 实体。When the attribute is rendered on the client, special characters are automatically converted to their equivalent HTML entity. 例如, ( # A0) 的小于号字符将转换为 &lt;For example, the less than character (<) is converted to &lt;. 分析该属性时,HTML 实体将自动转换回其等效的纯文本字符。When the attribute is parsed, HTML entities are automatically converted back to their equivalent, plain text characters.

适用于

另请参阅