HtmlTableRow Class
Assembly: System.Web (in system.web.dll)
The <tr> element represents a row in a table. Use the HtmlTableRow class to programmatically control the <tr> HTML elements in an HtmlTable control.
The HtmlTableRow class allows you to customize the appearance of a row in a table by specifying the background color, the border color, and the height of the cells in the row. These attributes are set using the BgColor, BorderColor, and Height properties.
You can control the alignment of the contents in the cells for the entire row by using the Align and VAlign properties. The Align property controls the horizontal alignment of the contents of the cells, while the VAlign property controls the vertical alignment.
By using the Cells collection of this class, you can programmatically access the individual cells in a row of a table. This allows you to control the properties of each cell, as well as the content.
For a list of initial property values for an instance of HtmlTableRow, see the HtmlTableRow constructor.
| Topic | Location |
|---|---|
| How to: Add HTML Server Controls to a Web Page Using ASP.NET Syntax | 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: Set HTML Server Control Properties Programmatically | Building ASP .NET Web Applications |
The following code example demonstrates how to use an HtmlTableRow instance to represent a row in the HtmlTable control. An HtmlTableRow is retrieved from the Rows collection of the table and its contents are modified.
- 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.HtmlTableRow
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.