.NET Framework Class Library TableCaptionAlign Enumeration Specifies the horizontal or vertical placement of the text to render as the HTML caption element.
Namespace:
System.Web.UI.WebControls
Assembly:
System.Web (in System.Web.dll)

Syntax
Public Enumeration TableCaptionAlign
public enum TableCaptionAlign
public enum class TableCaptionAlign

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

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

Examples
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.
<%@ page language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
<title>TableCaptionAlign Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>TableCaptionAlign Enumeration Example</h3>
<!-- Scope attribute added for accessibility -->
<asp:table id="Table1" runat="server" CellPadding="4"
caption="City Postal Codes" CellSpacing="1"
captionalign="Right" gridlines="Both">
<asp:TableRow>
<asp:TableHeaderCell id="CityHeader" Scope="Column">
City Name
</asp:TableHeaderCell>
<asp:TableHeaderCell id="ZipHeader" Scope="Column">
ZIP Code
</asp:TableHeaderCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Redmond
</asp:TableCell>
<asp:TableCell>
98052
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Albany
</asp:TableCell>
<asp:TableCell>
12222
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>
<%@ page language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
<title>TableCaptionAlign Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>TableCaptionAlign Enumeration Example</h3>
<!-- Scope attribute added for accessibility -->
<asp:table id="Table1" runat="server" CellPadding="4"
caption="City Postal Codes" CellSpacing="1"
captionalign="Right" gridlines="Both">
<asp:TableRow>
<asp:TableHeaderCell id="CityHeader" Scope="Column">
City Name
</asp:TableHeaderCell>
<asp:TableHeaderCell id="ZipHeader" Scope="Column">
ZIP Code
</asp:TableHeaderCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Redmond
</asp:TableCell>
<asp:TableCell>
98052
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Albany
</asp:TableCell>
<asp:TableCell>
12222
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), 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.

See Also
ReferenceTableCaptionAlign
|
Bibliothèque de classes .NET Framework TableCaptionAlign, énumération Spécifie le positionnement horizontal ou vertical du texte à rendre comme élément de légende HTML.
Espace de noms :
System.Web.UI.WebControls
Assembly :
System.Web (dans System.Web.dll)

Syntaxe
Public Enumeration TableCaptionAlign
public enum TableCaptionAlign
public enum class TableCaptionAlign

Membres
| Nom de membre | Description |
|---|
| NotSet | L'alignement de la légende n'est pas défini. Le navigateur qui rend la légende détermine où l'aligner. | | Top | L'élément de légende s'aligne sur le haut du tableau. | | Bottom | L'élément de légende s'aligne sur le bas du tableau. | | Left | L'élément de légende s'aligne sur le côté gauche du tableau. | | Right | L'élément de légende s'aligne sur le côté droit du tableau. |

Notes
L'énumération TableCaptionAlign indique le positionnement horizontal ou vertical de l'élément de légende HTML dans les contrôles pouvant être rendus sous forme de tableau, tel que Table, GridView, DetailsView ou Calendar. Par exemple, la propriété CaptionAlign utilise ces valeurs d'énumération pour définir l'alignement de la légende dans un contrôle Table. Si vous spécifiez NotSet, le navigateur dans lequel le contrôle est rendu sait où aligner la légende. La propriété CaptionAlign spécifie la position de l'élément de légende pour les contrôles pouvant être rendus sous forme de tableau. La propriété Caption spécifie le texte à afficher dans l'élément de légende. Les technologies d'assistance peuvent utiliser la description fournie par la propriété Caption pour rendre le contrôle plus accessible. Par exemple, un système de lecture d'écran pourra lire la légende à l'utilisateur pour lui fournir une description de la table.

Exemples
L'exemple suivant montre comment utiliser l'énumération TableCaptionAlign pour définir la propriété CaptionAlign dans un contrôle Table. Le contrôle Table contient les objets TableRow qui affichent les valeurs de Ville et de Code ZIP.
<%@ page language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
<title>TableCaptionAlign Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>TableCaptionAlign Enumeration Example</h3>
<!-- Scope attribute added for accessibility -->
<asp:table id="Table1" runat="server" CellPadding="4"
caption="City Postal Codes" CellSpacing="1"
captionalign="Right" gridlines="Both">
<asp:TableRow>
<asp:TableHeaderCell id="CityHeader" Scope="Column">
City Name
</asp:TableHeaderCell>
<asp:TableHeaderCell id="ZipHeader" Scope="Column">
ZIP Code
</asp:TableHeaderCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Redmond
</asp:TableCell>
<asp:TableCell>
98052
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Albany
</asp:TableCell>
<asp:TableCell>
12222
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>
<%@ page language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
<title>TableCaptionAlign Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>TableCaptionAlign Enumeration Example</h3>
<!-- Scope attribute added for accessibility -->
<asp:table id="Table1" runat="server" CellPadding="4"
caption="City Postal Codes" CellSpacing="1"
captionalign="Right" gridlines="Both">
<asp:TableRow>
<asp:TableHeaderCell id="CityHeader" Scope="Column">
City Name
</asp:TableHeaderCell>
<asp:TableHeaderCell id="ZipHeader" Scope="Column">
ZIP Code
</asp:TableHeaderCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Redmond
</asp:TableCell>
<asp:TableCell>
98052
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
Albany
</asp:TableCell>
<asp:TableCell>
12222
</asp:TableCell>
</asp:TableRow>
</asp:table>
</div>
</form>
</body>
</html>

Informations de version
.NET FrameworkPris en charge dans : 4, 3.5, 3.0, 2.0

Plateformes
Windows 7, Windows Vista SP1 ou ultérieur, Windows XP SP3, Windows XP SP2 Édition x64, Windows Server 2008 (installation minimale non prise en charge), Windows Server 2008 R2 (installation minimale prise en charge avec SP1 ou version ultérieure), Windows Server 2003 SP2
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Voir aussi
RéférenceTableCaptionAlign
|