HtmlTextWriter.IsValidFormAttribute(String) HtmlTextWriter.IsValidFormAttribute(String) HtmlTextWriter.IsValidFormAttribute(String) HtmlTextWriter.IsValidFormAttribute(String) Method

定義

檢查屬性,確定該屬性可以呈現在 <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 String String String

字串,其中包含要檢查的屬性名稱。A string that contains the name of the attribute to check.

傳回

一定是 trueAlways true.

備註

IsValidFormAttribute方法HtmlTextWriter 的類別實true作為所有屬性的。The HtmlTextWriter class implementation of the IsValidFormAttribute method returns true for all attributes. 覆寫<form>以限制可在專案的開頭標記中轉譯的屬性。 IsValidFormAttributeOverride the IsValidFormAttribute to limit the attributes that can be rendered in the opening tag of a <form> element.

給繼承者的注意事項

覆寫true <form>方法,只傳回這些屬性(attribute),這些屬性可以包含在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.

適用於

另請參閱