Please visit our sponsors !
Table Control
Definition and Usage
The Table control is used in conjunction with the TableCell control and the
TableRow control to create a table.
Properties
Property |
Description |
BackImageUrl |
A URL to an image to use as an background for the table |
BorderWidth |
The width of the border around the table |
CellPadding |
The space between the cell walls and contents |
CellSpacing |
The space between cells |
GridLines |
The gridlines in the table. Legal values are:
- None
- Horizontal
- Vertical
- Both
|
HorizontalAlign |
The horizontal alignment of the table in the page. Legal
values are:
- Center
- Justify
- Left
- NotSet
- Right
|
id |
A unique id for the control |
runat |
Specifies that the control is a server control. Must
be set to "server" |
Example 1
In the following example we declare a Table
control, two TableRow controls, and four TableCell controls in an .aspx file:
<html>
<body>
<form runat=server>
<asp:Table id="Table1" runat="server" CellPadding="5"
GridLines="Horizontal" HorizontalAlign="Center">
<asp:TableRow>
<asp:TableCell>1</asp:TableCell>
<asp:TableCell>2</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>3</asp:TableCell>
<asp:TableCell>4</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
</body>
</html>
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|