ASP.NET Table 控件

定义和用法

Table 控件与 TableCell 控件和 TableRow 控件配合使用,用于创建表格。

属性

属性 描述 .NET
BackImageUrl 表格背景图像的 URL。 1.0
Caption 表格的标题(caption)。 2.0
CaptionAlign 标题文本的对齐方式。 2.0
CellPadding 单元格边框与内容的间距。 1.0
CellSpacing 单元格间距。 1.0
GridLines 表格中的网格线格式。 1.0
HorizontalAlign 表格在页面中的水平对齐方式。 1.0
Rows 表格中的行集合。 1.0
runat 该控件必须定义为服务器控件。必须设置为 "server"。 1.0

Web-Kontrollen Standardattribute

AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth 
CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled 
SkinID, Style, TabIndex, ToolTip, Width

Für eine vollständige Beschreibung besuchen Sie bitte Web-Kontrollen Standardattribute.

Kontrollen Standardattribute

AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls 
EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site 
TemplateControl, TemplateSourceDirectory, UniqueID, Visible

Für eine vollständige Beschreibung besuchen Sie bitteKontrollen Standardattribute.

Beispiel

Tabelle
In diesem Beispiel haben wir in der .aspx-Datei zwei Table-Kontrollen deklariert.
Tabelle 2
In diesem Beispiel haben wir in der .aspx-Datei einen Table-Kontrollen, drei TableRow-Kontrollen und zwei TableCell-Kontrollen deklariert.