HtmlTable Class
Assembly: System.Web (in system.web.dll)
Use the HtmlTable control to programmatically control the HTML <table> element on the server. This allows you to create a table on a Web page.
You can dynamically change the appearance of the <table> element by setting the BgColor, Border, BorderColor, Height, and Width properties. You can also control how the content of a cell is displayed by setting the Align, CellPadding, and CellSpacing properties.
The rows of the HtmlTable control are stored in the Rows property of the control. This allows you to programmatically access the individual rows of the table.
Note |
|---|
| A complex table model is not supported. You cannot have an HtmlTable control with nested <caption>, <col>, <colgroup>, <tbody>, <thead>, or <tfoot> elements. These elements are removed without warning and do not appear in the output HTML. An exception will be thrown if you attempt to programmatically add these table model elements to the Control.Controls collection of the HtmlTable control. |
For a list of initial property values for an instance of HtmlTable, see the HtmlTable constructor.
| Topic | Location |
|---|---|
| How to: Add HTML Server Controls to a Web Page Using ASP.NET Syntax | Building ASP .NET Web Applications |
| How to: Add Rows and Cells Dynamically to a Table Web Server Control | Building ASP .NET Web Applications |
| How to: Set HTML Server Control Properties Programmatically | Building ASP .NET Web Applications |
| How to: Add HTML Server Controls to a Web Page Using ASP.NET Syntax | Building ASP .NET Web Applications |
| How to: Add Rows and Cells Dynamically to a Table Web Server Control | Building ASP .NET Web Applications |
| How to: Set HTML Server Control Properties Programmatically | Building ASP .NET Web Applications |
| How to: Create and Edit HTML Tables in Design View | Building ASP .NET Web Applications in Visual Studio |
| How to: Select HTML Table Elements and Contents in Visual Web Developer | Building ASP .NET Web Applications in Visual Studio |
| How to: Resize HTML Table Elements in Visual Web Developer | Building ASP .NET Web Applications in Visual Studio |
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.Web.UI.Control
System.Web.UI.HtmlControls.HtmlControl
System.Web.UI.HtmlControls.HtmlContainerControl
System.Web.UI.HtmlControls.HtmlTable
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note