ASP.NET TableCell 控件

定义和用法

TableCell 控件与 Table 控件和 TableRow 控件结合,用于创建表格中的单元格。

提示:每行的单元格都存储在 TableRow 控件的 Cells 集合中。

属性

属性 描述 .NET
AssociatedHeaderCellID 与 TableCell 控件关联的表标题单元格列表。 2.0
ColumnSpan 单元格跨越的列数。 1.0
HorizontalAlign 单元格内容的水平对齐方式。 1.0
RowSpan 单元格跨越的行数。 1.0
runat 该控件是服务器控件。必须设置为 "server"。 1.0
Text 规定单元格的文本内容。 1.0
VerticalAlign 单元格内容的垂直对齐方式。 1.0
Wrap Bestimmt, ob der Zelleninhalt umgebrochen wird. 1.0

Web Control Standard Attribute

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 Control Standard Attribute.

Control Standard Attribute

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

Für eine vollständige Beschreibung besuchen Sie bitteControl Standard Attribute.

Beispiel

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