articles

Home / DeveloperSection / Articles / Table in ASP.Net

Table in ASP.Net

Pushpendra Singh6495 18-Oct-2010

The Table control is used in conjunction with the Table Cell control and the Table Row control to create a table. The Table Web server control manages data in tabular form.

<table cellpadding="2">
<tr>
<td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
</tr>
<tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
</tr>
<tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

 

<tr> </tr> specified the Row of the table.

<td> </td> specified the cell of the Row.

Properties:

Cell Padding: Gets/Sets the distance between the border and the contents of the table cell
Cell Spacing: Gets/Sets the distance between table cells
Horizontal Align: Gets/Sets the horizontal alignment of the table within the page
Rows: Gets/Sets the collection of rows within the table

Change Table background color

<table cellpadding="2" class="style1" frame="box" style="border-collapse: collapse; background-color: #C0C0C0;">
<tr>
<td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
</tr>
<tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
</tr>
<tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
</tr>
</table>

Table in ASP.Net


Updated 13-Nov-2019

Leave Comment

Comments

Liked By