Latest web development tutorials

ASP.NET TableCell Horizo​​ntalAlign 屬性

TableCell 控件 TableCell控件

定義和用法

Horizo​​ntalAlign 屬性用於設置或返回在TableCell 控件中內容的水平對齊方式。

語法

<asp:TableCell HorizontalAlign="align" runat="server">
Some Content
</asp:TableCell>
属性 描述
align 规定内容的水平对齐方式。

可能的值:

  • Center
  • Justify
  • Left
  • NotSet (Default)
  • Right


實例

下面的實例設置了TableCell 控件的Horizo​​ntalAlign 屬性:

<form runat="server">
<asp:Table id="tab1" runat="server">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Center">
Hello!
</asp:TableCell>
<asp:TableCell>
Hello!
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>

演示實例»

TableCell 控件 TableCell控件