Table.HorizontalAlign Eigenschap
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee haalt u de horizontale uitlijning van het Table besturingselement op de pagina op of stelt u deze in.
public:
virtual property System::Web::UI::WebControls::HorizontalAlign HorizontalAlign { System::Web::UI::WebControls::HorizontalAlign get(); void set(System::Web::UI::WebControls::HorizontalAlign value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
Public Overridable Property HorizontalAlign As HorizontalAlign
Waarde van eigenschap
Een van de HorizontalAlign opsommingswaarden. De standaardwaarde is NotSet.
- Kenmerken
Voorbeelden
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
<title>Table - C# Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Table - C# Example</h3>
<asp:Table id="Table1" runat="server"
GridLines="Both" BackImageUrl="image1.gif"
HorizontalAlign="Center" CellSpacing="3"
CellPadding="3">
<asp:TableRow>
<asp:TableCell>Row 0, Col 0</asp:TableCell>
<asp:TableCell>Row 0, Col 1</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>Row 1, Col 0</asp:TableCell>
<asp:TableCell>Row 1, Col 1</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
<title>Table - VB.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Table - C# Example</h3>
<asp:Table id="Table1" runat="server"
GridLines="Both" BackImageUrl="image1.gif"
HorizontalAlign="Center" CellSpacing="3"
CellPadding="3">
<asp:TableRow>
<asp:TableCell>Row 0, Col 0</asp:TableCell>
<asp:TableCell>Row 0, Col 1</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>Row 1, Col 0</asp:TableCell>
<asp:TableCell>Row 1, Col 1</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
Opmerkingen
Gebruik de HorizontalAlign eigenschap om de horizontale uitlijning van het Table besturingselement op de pagina op te geven. De volgende tabel bevat de verschillende horizontale uitlijningsstijlen.
| Horizontaal uitlijningswaarde | Beschrijving |
|---|---|
NotSet |
De horizontale uitlijning van het Table besturingselement is niet ingesteld. |
Left |
Het Table besturingselement wordt op de pagina uitgevuld. |
Center |
Het Table besturingselement is gecentreerd op de pagina. |
Right |
Het Table besturingselement is juist gerechtvaardigd op de pagina. |
Justify |
Het Table besturingselement is uitgelijnd met zowel de linker- als de rechtermarge van de pagina. |