System.Web.UI.WebControls.TableCell Class

Represents a cell in a System.Web.UI.WebControls.Table control.

See Also: TableCell Members


[System.ComponentModel.Designer("System.Web.UI.Design.WebControls.PreviewControlDesigner, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")]
public class TableCell : WebControl


In this topic:


The System.Web.UI.WebControls.TableCell class represents a cell in a System.Web.UI.WebControls.Table control. You can use the TableCell.Text property to specify or determine the contents of the cell.

The System.Web.UI.WebControls.TableCell 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 TableCell.HorizontalAlign and TableCell.VerticalAlign properties. You can use the TableCell.Wrap 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 System.Web.UI.WebControls.Table control, are occupied by an individual cell. The TableCell.RowSpan and TableCell.ColumnSpan 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 ControlsHow 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


    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,