ASP.NET Table Control

Definition and Usage

The Table control works with the TableCell control and TableRow control to create a table.

Property

Property Description .NET
BackImageUrl The URL of the background image of the table. 1.0
Caption The title (caption) of the table. 2.0
CaptionAlign The alignment of the caption text. 2.0
CellPadding The spacing between the cell border and the content. 1.0
CellSpacing Cell spacing. 1.0
GridLines The gridline format in the table 1.0
HorizontalAlign The horizontal alignment of the table in the page. 1.0
Rows The collection of rows in the table. 1.0
runat The control is a server control. It must be set to "server". 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 complete 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 complete description, please visitControl Standard Properties.

Example

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