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 Specify whether the cell content wraps. 1.0

Web Control Standard Properties

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

For a full description, please visit Web Control Standard Properties.

Control Standard Properties

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

For a full description, please visitControl Standard Properties.

Example

Table
In this example, we declared two Table controls in the .aspx file.
Table 2
In this example, we declared a Table control, three TableRow controls, and two TableCell controls in the .aspx file.