Propriété HorizontalAlign ASP.NET

Définition et utilisation

L'attribut HorizontalAlign est utilisé pour définir ou retourner le mode d'alignement horizontal du contenu dans le contrôle TableCell.

Syntaxe

<asp:TableCell HorizontalAlign="align" runat="server">
Some Content
</asp:TableCell>
Propriété Description
align

Définir l'alignement horizontal du contenu.

Valeurs possibles :

  • Centré
  • Justifié
  • Gauche
  • NonDéfini (par défaut)
  • Droite

Exemple

L'exemple suivant définit l'attribut HorizontalAlign du contrôle TableCell :

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

Exemple

Définir l'alignement horizontal pour le contrôle TableCell