CheckBox.LabelAttributes 屬性

定義

針對 CheckBox 控制項的呈現 LABEL 項目,取得屬性集合的參考。Gets a reference to the collection of attributes for the rendered LABEL element of the CheckBox control.

public:
 property System::Web::UI::AttributeCollection ^ LabelAttributes { System::Web::UI::AttributeCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.UI.AttributeCollection LabelAttributes { get; }
[<System.ComponentModel.Browsable(false)>]
member this.LabelAttributes : System.Web.UI.AttributeCollection
Public ReadOnly Property LabelAttributes As AttributeCollection

屬性值

AttributeCollection

屬性名稱和值的集合,這些名稱和值會加入至 CheckBox 的呈現 LABEL 項目。The collection of attribute names and values that are added to the rendered LABEL element for the CheckBox. 預設為空的 AttributeCollectionThe default is an empty AttributeCollection.

屬性

備註

Text控制項的屬性 CheckBox 會使用 HTML 標籤元素來轉譯和顯示。The Text property of a CheckBox control is rendered and displayed using an HTML LABEL element. 您可以使用屬性上的方法,將其他屬性新增至轉譯的 LABEL 元素 Add LabelAttributesYou can add additional attributes to the rendered LABEL element using the Add method on the LabelAttributes property.

適用於

另請參閱