TableStyle Class
Represents the style for the Table control and some Web Parts.
Assembly: System.Web (in System.Web.dll)
The TableStyle class is used to represent the style for a table control. It encapsulates the properties that control the appearance of a table and can be applied to multiple table controls to provide a common appearance.
You can specify an image to display in the background of the table by setting the BackImageUrl property. The amount of spacing between the cells of a table is controlled by the CellSpacing property. The spacing between the contents of a cell and the cell border is specified using the CellPadding property. You can specify whether cell borders are displayed by setting the GridLines property. The horizontal alignment of the table in relation to other elements on the Web Forms page is indicated by the HorizontalAlign property.
Note: |
|---|
This class is primarily used by control developers. |
The following example creates a TableStyle object and then uses the ApplyStyle method to apply it to a generated Table object.
- AspNetHostingPermission
to run the TableStyle class in a hosted environment. Associated enumeration: Minimal
System::MarshalByRefObject
System.ComponentModel::Component
System.Web.UI.WebControls::Style
System.Web.UI.WebControls::TableStyle
System.Web.UI.WebControls.WebParts::WebPartMenuStyle
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: