Latest web development tutorials

ASP.NET Table HorizontalAlign property

Table Controls Table Controls

Definition and Usage

HorizontalAlign property sets or returns the horizontal alignment of the Table control content.

grammar

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

可能的值:

  • Center
  • Justify
  • Left
  • NotSet (默认)
  • Right


Examples

The following examples set HorizontalAlign property Table control:

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

The demonstration >>

Table Controls Table Controls