This documentation is archived and is not being maintained.

HtmlTableCell::Align Property

Gets or sets the horizontal alignment of the content in the cell represented by an instance of the HtmlTableCell class.

Namespace:  System.Web.UI.HtmlControls
Assembly:  System.Web (in System.Web.dll)

public:
property String^ Align {
	String^ get ();
	void set (String^ value);
}
<asp:HtmlTableCell Align="String" />

Property Value

Type: System::String
The horizontal alignment of the content in the cell represented by an instance of HtmlTableCell. The default value is String::Empty, which indicates that this property is not set.

Use the Align property to specify the horizontal alignment of the content in a cell represented by an instance of the HtmlTableCell class.

NoteNote

Setting this property affects only the cell represented by an instance of the HtmlTableCell class. To apply the same alignment to the cells of an entire row in the table, set the Align property of the row represented by an instance of the HtmlTableRow class.

The following table lists the values that can be used for this property.

Value

Description

Left

Aligns the contents of a cell with the left edge of the cell.

Center

Aligns the contents of a cell in the middle of the cell.

Right

Aligns the contents of a cell with the right edge of the cell.

NoteNote

You can also use Justify and Char as values for this property; however, not all browsers support these features.

The following code example demonstrates how to use the Align property to programmatically control the alignment of the contents of the cells in an HtmlTable control.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: