How to: Add Table Web Server Controls to a Web Forms Page (Visual Studio)
Adding aWeb server control consists of two steps: adding the table itself, and separately adding the rows and cells. You can add rows and columns at design time to create a static table, or you can add them at run time in code. For details about adding them at run time, see .
In general, if you are creating a static table (one in which you will not add or change content at run time), it is better to use an HTML table element in place of a Table Web server control.
To add a Table Web server control to a Web Forms page
From the Standard tab of the Toolbox, drag a Table control onto the page.
The table is initially displayed as a simple text control with no rows or columns.
Adding Table Rows and Cells at Design Time
To create a static table, you can add rows and cells at design time.
To add rows and cells to a Table Web server control at design time
Select the table, and then open the Properties window and click the ellipsis button () for the Rows property.
The TableRow Collection Editor window is displayed.
Click Add to create a new row.
A new row is added, and its properties are displayed in a grid on the right-hand side of the dialog box.
Optionally, set display characteristics for the new row by changing its font, color, and so on.
Settings you enter in the TableRow Collection Editor dialog box apply to only one row. To apply settings that apply to all rows, set properties for the table as a whole.
To add cells to the new row, make sure the row is selected in the Members list, and then click the ellipsis button () for the Cells property.
The TableCell Collection Editor dialog box is displayed.
Click Add to create a new cell, and set its properties using the grid on the right-hand side of the dialog box. To display text in the cell, set its Text property.
Repeat step 5 for each cell you want to add to a row. When you are finished adding cells to a row, click OK in the TableCell Collection Editor dialog box.
Repeat steps 2 through step 6 for each new row and its cells. When you are finished adding rows to the table, click OK in the TableRow Collection Editor dialog box.
The Table control is displayed in Design view with placeholder characters for each row and cell that you have created.