System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.WebControls.WebControl System.ComponentModel.Designer("System.Web.UI.Design.WebControls.PreviewControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.Bindable(false) System.ComponentModel.ToolboxItem("") System.Web.UI.ParseChildren(true, "Cells") System.ComponentModel.DefaultProperty("Cells")

In this topic:

Introduction

Declarative Syntax

## Introduction

The class represents a row in a control.

This class allows you to control how the contents of the row are displayed. The alignment of the contents in the row are specified by setting the and properties.

You can programmatically manage the cells in the row by using the collection. The collection is a collection of objects that represent the cells in the row.

The control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see Validation ASP.NET Controls.

## Declarative Syntax

`<asp:TableRow AccessKey="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CssClass="string" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalAlign="NotSet|Left|Center|Right|Justify" ID="string" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" runat="server" SkinID="string" Style="string" TabIndex="integer" TableSection="TableHeader|TableBody|TableFooter" ToolTip="string" VerticalAlign="NotSet|Top|Middle|Bottom" Visible="True|False" Width="size" > <asp:TableCell AccessKey="string" AssociatedHeaderCellID="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" ColumnSpan="integer" CssClass="string" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalAlign="NotSet|Left|Center|Right|Justify" ID="string" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" RowSpan="integer" runat="server" SkinID="string" Style="string" TabIndex="integer" Text="string" ToolTip="string" VerticalAlign="NotSet|Top|Middle|Bottom" Visible="True|False" Width="size" Wrap="True|False" /> <asp:TableHeaderCell AbbreviatedText="string" AccessKey="string" AssociatedHeaderCellID="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CategoryText="string" ColumnSpan="integer" CssClass="string" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalAlign="NotSet|Left|Center|Right|Justify" ID="string" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" RowSpan="integer" runat="server" Scope="NotSet|Row|Column" SkinID="string" Style="string" TabIndex="integer" Text="string" ToolTip="string" VerticalAlign="NotSet|Top|Middle|Bottom" Visible="True|False" Width="size" Wrap="True|False" /> </asp:TableRow>`

Represents a row in a control.

- Constructor

  Use this constructor to create and initialize a new instance of the class.

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.TableCellCollection To be added: an object of type 'TableCellCollection'

  Use this property to programmatically control a collection of objects that represent the cells from a row of the control. You can programmatically add, insert, or remove a object from the collection.

  This property is only used when building controls programmatically. At design time, this property is set by declaring objects.

  Gets a collection of objects that represent the cells of a row in a control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)
  System.ComponentModel.MergableProperty(false)
- Method
  System.Web.UI.ControlCollection

  The method creates a new object that holds the cells.

  The method is primarily of interest to control developers extending the functionality of the control.

  Creates a new object for the control.

  A object that contains the control's child server controls.

  1.0.5000.0
  2.0.0.0
- Method
  System.Web.UI.WebControls.Style To be added

  Creates a object for the control.

  A object that specifies the style properties for the control.

  The method is primarily of interest to control developers extending the functionality of the control.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.HorizontalAlign To be added: an object of type 'HorizontalAlign'

  Use the property to specify the horizontal alignment of the contents of the row. The following table lists the possible values.

  Horizontal Alignment

  Description

  The horizontal alignment is not set.

  The contents of the row are left justified.

  The contents of the row are centered.

  The contents of the row are right justified.

  The contents of the row are uniformly spread out and aligned with both the left and right margins.

  Gets or sets the horizontal alignment of the contents in the row.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.HorizontalAlign.NotSet)
- Property
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.TableRowSection.TableBody)
  System.Web.UI.WebControls.TableRowSection To be added.

  Use the property to get or set where the object is placed in a control. For the available table locations, see . The following table lists the possible values.

  Table row section

  Displayed as

  The header row.

  The body of the table.

  The footer row.

  When using the declarative syntax, the sections must be in the order of header, body, and then footer.

  The enumeration enables you to build accessible Web sites using the control by adding the <thead>, <tbody>, and <tfoot> elements to the HTML that is rendered to the client. If all rows in a table are in the <tbody> element, the section information is not rendered. At least one row must be in a non-body element.

  The value of this property is stored in view state.

  Gets or sets the location for a object in a control.

- Property
  System.Web.UI.WebControls.VerticalAlign To be added: an object of type 'VerticalAlign'

  Use the property to specify the vertical alignment of the contents of the row. The following table lists the possible values.

  Vertical Alignment

  Description

  The vertical alignment is not set.

  The contents of the row are aligned with the top of the row.

  The contents of the row are aligned with the middle of the row.

  The contents of the row are aligned with the bottom of the row.

  Gets or sets the vertical alignment of the contents in the row.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.VerticalAlign.NotSet)