Latest web development tutorials

ASP.NET TableCell HorizontalAlign property

TableCell control TableCell control

Definition and Usage

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

grammar

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

可能的值:

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


Examples

The following examples set HorizontalAlign property TableCell control:

<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>

The demonstration >>

TableCell control TableCell control