ChtmlTextWriter.OnStyleAttributeRender(String, String, HtmlTextWriterStyle) 方法

定义

确定是否可以向当前标记元素呈现指定的 cHTML 标记样式特性及其值。Determines whether the specified cHTML markup style attribute and its value can be rendered to the current markup element.

protected:
 override bool OnStyleAttributeRender(System::String ^ name, System::String ^ value, System::Web::UI::HtmlTextWriterStyle key);
protected override bool OnStyleAttributeRender (string name, string value, System.Web.UI.HtmlTextWriterStyle key);
override this.OnStyleAttributeRender : string * string * System.Web.UI.HtmlTextWriterStyle -> bool
Protected Overrides Function OnStyleAttributeRender (name As String, value As String, key As HtmlTextWriterStyle) As Boolean

参数

name
String

包含要呈现的样式属性名称的字符串。A string containing the name of the style attribute to render.

value
String

一个包含要分配给 name 的值的字符串。A string containing the value that is assigned to name.

key
HtmlTextWriterStyle

HtmlTextWriterStyle 关联的 nameThe HtmlTextWriterStyle associated with name.

返回

Boolean

如果可以呈现样式,则为 true;否则为 falsetrue if the style can be rendered; otherwise, false.

注解

OnStyleAttributeRender falsekey 等于 TextDecoration 字段且值为时,该方法返回 "line-through"The OnStyleAttributeRender method returns false when key is equal to the TextDecoration field and the value is "line-through".

适用于

另请参阅