TableCaptionAlign Enumeration
Specifies the horizontal or vertical placement of the text to render as the HTML caption element.
Assembly: System.Web (in System.Web.dll)
| Member name | Description | |
|---|---|---|
| NotSet | The caption alignment is not set. The browser that renders the caption determines where to align the caption. | |
| Top | The caption element is aligned with the top of the table. | |
| Bottom | The caption element is aligned with the bottom of the table. | |
| Left | The caption element is aligned with the left side of the table. | |
| Right | The caption element is aligned with the right side of the table. |
The TableCaptionAlign enumeration represents the horizontal or vertical placement of the HTML caption element in controls that can be rendered as tables, such as Table, GridView, DetailsView, or Calendar. For example, the CaptionAlign property uses these enumeration values to set the caption alignment in a Table control.
If you specify NotSet, the browser in which the control is rendered determines where to align the caption.
The CaptionAlign property specifies the position of the caption element with respect to controls that can be rendered as tables. The Caption property specifies the text to display in the caption element. Assistive technology devices can use the description provided by the Caption property to make the control more accessible. For example, a screen reader device might read the caption to the user to provide them with a description of the table.
The following example demonstrates how to use the TableCaptionAlign enumeration to set the CaptionAlign property in a Table control. The Table control contains TableRow objects that display City and ZIP Code values.
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.