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(false) System.ComponentModel.DefaultProperty("Text") System.Web.UI.ControlBuilder(typeof(System.Web.UI.WebControls.TableCellControlBuilder))

In this topic:

Introduction

Declarative Syntax

## Introduction

The class represents a cell in a control. You can use the property to specify or determine the contents of the cell.

The class allows you to control how the contents of the cell are displayed. The alignment of the contents in the cell are specified by setting the and properties. You can use the property to specify whether the contents of the cell wrap in the cell.

You can also specify how many rows or columns in the table, represented by a control, are occupied by an individual cell. The and properties control how many rows and columns are used, respectively.

This 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 Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

## Declarative Syntax

`<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:TableCell>`

Represents a cell in a control.

- Constructor

  The is created using the tag.

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void ``

  The method overrides the base class's method and first calls the base method and then adds the attributes corresponding to the property, the property and the property. If the property refers to a that can not be found, an is thrown.

  The method is used primarily by control developers extending the functionality of the control.

  Adds properties specific to the control to the list of attributes to render.

  The output stream that renders HTML content to the client. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  If the control contains child controls then the base class's method is called; otherwise, the control's property value is added as a object to the control's .

  The method is used primarily by control developers extending the functionality of the control.

  Adds a parsed child control to the control.

  An that represents the parsed element 1.0.5000.0 2.0.0.0
- Property
  2.0.0.0
  System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.StringArrayConverter))
  System.ComponentModel.DefaultValue(null)
  System.String[] To be added.

  The property contains a list of header cell programmatic identifiers that provide header information of the control. The list of header cell identifiers is rendered as a comma delimited list into the HTML <td> element's header attribute.

  When setting the property use a comma delimited list of strings. If an element of the list is not recognized as a valid table header cell an is thrown when the is invoked.

  Gets or sets a space-separated list of table header cells associated with the control.

- Property
  System.Int32 To be added: an object of type 'int'

  Use the property to specify or determine the number of columns in the rendered table that the cell spans. For example, if you set this property to 2, the cell takes up two columns in the control.

  Gets or sets the number of columns in the control that the cell spans.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(0)
- Method
  System.Web.UI.WebControls.Style

  The created by the method is used with the , , and properties.

  The method is used primarily by control developers extending the functionality of the control.

  Creates a for the control.

  A that represents the for 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 cell. The possible values for use are specified in the enumeration.

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

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.HorizontalAlign.NotSet)
- Method
  System.Void ``

  If the control has child controls or is overridden in a derived class the base class's method is called; otherwise, the value of the property is written to the object.

  The method is used primarily by control developers extending the functionality of the control.

  Renders the contents to the specified object.

  The output stream that renders HTML content to the client. 1.0.5000.0 2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  Use the property to specify or determine the number of rows in the rendered table that the cell spans. For example, if you set this property to 2, the cell takes up two rows in the control.

  Gets or sets the number of rows in the control that the cell spans.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(0)
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify or determine the text contents of the cell. This property is commonly used to programmatically update the contents of a cell.

  Setting the property will clear any other controls contained in the .

  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 Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text contents of the cell.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue("")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)
  System.ComponentModel.Localizable(true)
- 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 cell. The possible values for use are specified in the enumeration.

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

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.VerticalAlign.NotSet)
- Property
  System.Boolean To be added: an object of type 'bool'

  Use the property to specify or determine whether the content of the cell wrap in the cell.

  Gets or sets a value that indicating whether the contents of the cell wrap.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(true)