HtmlTextWriter.IsValidFormAttribute(String) 方法

定义

检查属性,确保它可以在 <form> 标记元素的开始标记中呈现。Checks an attribute to ensure that it can be rendered in the opening tag of a <form> markup element.

public:
 virtual bool IsValidFormAttribute(System::String ^ attribute);
public virtual bool IsValidFormAttribute (string attribute);
abstract member IsValidFormAttribute : string -> bool
override this.IsValidFormAttribute : string -> bool
Public Overridable Function IsValidFormAttribute (attribute As String) As Boolean

参数

attribute
String

包含要检查的属性名称的字符串。A string that contains the name of the attribute to check.

返回

总是为 trueAlways true.

注解

IsValidFormAttribute方法的true类实现为所有属性返回。 HtmlTextWriterThe HtmlTextWriter class implementation of the IsValidFormAttribute method returns true for all attributes. <form>重写IsValidFormAttribute以限制可在元素的开始标记中呈现的特性。Override the IsValidFormAttribute to limit the attributes that can be rendered in the opening tag of a <form> element.

继承者说明

重写true <form> HtmlTextWriter方法,以便仅返回可包含在类派生的类的元素中的属性。 IsValidFormAttribute(String)Override the IsValidFormAttribute(String) method to return true only for those attributes that can be included in the <form> element of the markup for which the class derived from the HtmlTextWriter class is intended.

适用于

另请参阅