Latest web development tutorials

ASP.NET CheckBoxList TextAlign 屬性

CheckBoxList 控件 CheckBoxList控件

定義和用法

TextAlign 屬性用於獲取或設置CheckBoxList 項目的文本的文本對齊方式。

語法

<asp:CheckBoxList TextAlign="align" runat="server">
Some Content
</asp:CheckBoxList>

属性 描述
align 为列表项目规定文本的对齐方式。

可能的值:

  • Left
  • Right (默认)


實例

下面的實例把CheckBoxList 控件中的TextAlign 屬性設置為"Left":

<form runat="server">
<asp:CheckBoxList id="rb1"
runat="server" TextAlign="Left">

Some content

</asp:CheckBoxList>
</form>

演示實例»

CheckBoxList 控件 CheckBoxList控件