Export (0) Print
Expand All

TableCell.HorizontalAlign Property

Gets or sets the horizontal alignment of the contents in the cell.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public virtual HorizontalAlign HorizontalAlign { get; set; }
/** @property */
public HorizontalAlign get_HorizontalAlign ()

/** @property */
public void set_HorizontalAlign (HorizontalAlign value)

public function get HorizontalAlign () : HorizontalAlign

public function set HorizontalAlign (value : HorizontalAlign)

Not applicable.

Property Value

One of the HorizontalAlign enumeration values. The default is NotSet.

Use the HorizontalAlign property to specify the horizontal alignment of the contents of the cell. The possible values for use are specified in the HorizontalAlign enumeration.

The following code example demonstrates how to declaratively specify the HorizontalAlign property of a TableCell control. In particular, note how the cell in the last row is left justified. For a complete, working code example, see the TableHeaderCell class overview topic.

<asp:TableCell AssociatedHeaderCellID="Column1Header,Column2Header,Column3Header"
ColumnSpan="3"
HorizontalAlign="Left">(2,0)
</asp:TableCell>

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft