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.HtmlControls.HtmlContainerControl System.Web.UI.ConstructorNeedsTag(true) The <td> element represents a data cell in a table, while the <th> element represents a table heading cell. Use the class to programmatically control the <td> and <th> HTML elements in an object. The class allows you to customize the appearance of a cell in a table by specifying the background color, the border color, the height, and the width. These attributes are set using the , , , and properties. You can control how the content of a cell is displayed by specifying the vertical and horizontal alignment of the contents. You can also specify whether the content automatically continues on the next line when the end of the cell is reached. The horizontal alignment is controlled by the property, while the property controls the vertical alignment. The property indicates whether text wrapping is disabled. By using the or the property, you can control the number of columns or rows that a cell occupies. For example, you can create a cell that occupies two columns in a table by setting the property to 2. For a list of initial property values for an instance of , see the constructor. 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 Validation Server Controls. Represents the <td> and <th> HTML elements in an object. Constructor Use this constructor to create and initialize a new instance of the class. This constructor is used to create an object that represents the <td> element for a table data cell. The following table shows the initial property value for an instance of . Property Initial Value The "td" literal string. Initializes a new instance of the class using default values. 1.0.5000.0 2.0.0.0 Constructor Use this constructor to create and initialize a new instance of the class. It allows you to create an object that represents a cell in an control. It is commonly used to create an object that represents a <th> element for a table heading cell. Although you can use this constructor to create a <td> element for a table data cell, you typically use the default constructor. Although this constructor allows you to specify the cell element to create, the <th> element is the only supported cell element. For future compatibility, this constructor allows you to create other HTML cell elements that could become available. The following table shows the initial property value for an instance of . Property Initial Value The value of the parameter. Initializes a new instance of the class, using the specified tag name. The element name of the tag. 1.0.5000.0 2.0.0.0 Property System.String To be added: an object of type 'string' Use the property to specify the horizontal alignment of the content in a cell represented by an instance of the class. Setting this property affects only the cell represented by an instance of the class. To apply the same alignment to the cells of an entire row in the table, set the property of the row represented by an instance of the class. The following table lists the values that can be used for this property. Value Description Left Aligns the contents of a cell with the left edge of the cell. Center Aligns the contents of a cell in the middle of the cell. Right Aligns the contents of a cell with the right edge of the cell. You can also use Justify and Char as values for this property; however, not all browsers support these features. Gets or sets the horizontal alignment of the content in the cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.String To be added: an object of type 'string' Use the property to specify the background color of the cell represented by an instance of the class. You can specify a color either by name or by using a hexadecimal value, preceded by the pound character (#), in the form #RRGGBB. RR, GG, and BB represent hexadecimal values from 0 to 255 that indicate the red, green, and blue components of a color, respectively. For example, the value #0000FF represents the color blue. It specifies the minimum value (00) for the red and green components, while specifying the maximum value (FF) for the blue component. The following table shows the sixteen predefined HTML color names and corresponding hexadecimal values that can be used for the property. For more information on HTML colors, see the World Wide Web Consortium (W3C) Web site. Color name Hexadecimal value Aqua #00FFFF Black #000000 Blue #0000FF Fuchsia #FF00FF Gray #808080 Green #008000 Lime #00FF00 Maroon #800000 Navy #000080 Olive #808000 Purple #800080 Red #FF0000 Silver #C0C0C0 Teal #008080 White #FFFFFF Yellow #FFFF00 The available colors for use with the property can be determined from the enumeration. Color names are case-insensitive. Gets or sets the background color of the cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.String To be added: an object of type 'string' Use the property to specify the border color of the cell represented by an instance of the class. You can specify a color either by name or by using a hexadecimal value, preceded by the pound character (#), in the form #RRGGBB. RR, GG, and BB represent hexadecimal values from 0 to 255 that indicate the red, green, and blue components of a color, respectively. For example, the value #0000FF represents the color blue. It specifies the minimum value (00) for the red and green components, while specifying the maximum value (FF) for the blue component. The following table shows the sixteen predefined HTML color names and corresponding hexadecimal values that can be used for the property. For more information on HTML colors, see the World Wide Web Consortium (W3C) Web site. Color name Hexadecimal value Aqua #00FFFF Black #000000 Blue #0000FF Fuchsia #FF00FF Gray #808080 Green #008000 Lime #00FF00 Maroon #800000 Navy #000080 Olive #808000 Purple #800080 Red #FF0000 Silver #C0C0C0 Teal #008080 White #FFFFFF Yellow #FFFF00 The available colors for use with the property can be determined from the enumeration. Color names are case-insensitive. Gets or sets the border color of the cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.Int32 To be added: an object of type 'int' In a cell represented by an instance of the class, use the property to specify the number of columns the cell occupies. This allows you to create a cell in the table that occupies more than one column. For example, suppose you have a table that contains two columns and two rows. You can create a table heading cell that spans both columns. Set the property of the leftmost cell in the first row to 2 to indicate that this cell takes up two columns in the table. When spanning columns, be sure to define one fewer cell in the row for each column that you span. For example, if you span two columns, define one fewer cell in the current row. Otherwise, that row will be longer than the number of columns in the table and the table will not be displayed as expected. Gets or sets the number of columns occupied by a cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.String To be added: an object of type 'string' Use the property to specify the height (in pixels) of the cell represented by an instance of the class. When you specify the height of a cell, all cells in the same row automatically share that height. If you specify a height that is smaller than is required to display the contents of the cell, this property is ignored. Gets or sets the height (in pixels) of the cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.Boolean To be added: an object of type 'bool' Use the property to specify or determine whether the text in a cell represented by an instance of the class automatically continues on the next line when it reaches the end of the cell. Gets or sets a value indicating whether the text in a cell represented by an instance of the class automatically continues on the next line when it reaches the end of the cell. 1.0.5000.0 2.0.0.0 System.ComponentModel.TypeConverter(typeof(System.Web.UI.MinimizableAttributeTypeConverter)) System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Method System.Void a The method provides additional formatting after calling the base class's method. The additional formatting makes the control's rendered HTML easier to read by adding a line return after the closing tag. The method is used primarily by control developers extending the functionality of the control. Renders the control's end tag. 1.0.5000.0 2.0.0.0 Property System.Int32 To be added: an object of type 'int' In a cell represented by an instance of the class, use the property to specify the number of rows the cell occupies. This allows you to create a cell in the table that occupies more than one row. For example, suppose you have a table that contains two columns and two rows. You can create a column that overlaps both rows. Set the property of the leftmost cell in the first column to 2 to indicate that this cell takes up two rows in the table. When spanning rows, be sure to define one fewer cell in the column for each row that you span. For example, if you span two rows, define one fewer cell in that column. Otherwise, that column will be longer than the number of rows in the table and the table will not be displayed as expected. Gets or sets the number of rows occupied by a cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.String To be added: an object of type 'string' Use the property to specify the vertical alignment of the content in a cell represented by an instance of the class. Setting this property affects only the cell represented by an instance of the class. To apply the same vertical alignment to the cells of an entire row in the table, set the property of the row represented by an instance of the class. The following table lists the values that can be used for this property. Value Description Top Aligns the contents of a cell with the upper edge of the cell. Middle Aligns the contents of a cell in the center of the cell. Bottom Aligns the contents of a cell with the lower edge of the cell. You can also use BaseLine as a value for this property. However, not all browsers support this feature. Gets or sets the vertical alignment for the content of a cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("") Property System.String To be added: an object of type 'string' Use the property to specify the width (in pixels) of the cell represented by an instance of the class. When you specify the width for a cell, all cells in the same column automatically share that width. If you specify a width that is smaller than is required to display the contents of the cell, this property is ignored. Gets or sets the width (in pixels) of the cell represented by an instance of the class. 1.0.5000.0 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("")