HOME

ASP.NET Tutorial
ASP.NET HOME
ASP.NET Intro
ASP.NET vs ASP
ASP.NET Install
ASP.NET Pages
ASP.NET Controls
ASP.NET Events

References
HTML Controls
Web Controls
Validation Controls

Please visit our sponsors !

TableCell Control

Back

Definition and Usage

The TableCell control is used in conjunction with the Table control and the TableRow control to create a cell in a table.

Tip: The cells of each row are stored in the Cells collection of the TableRow control.


Properties

Property Description
ColumnSpan The number of columns this cell should span
HorizontalAlign The horizontal alignment of the contents in the table cell. Legal values are:
  • Center
  • Justify
  • Left
  • NotSet
  • Right
id A unique id for the control
RowSpan The number of rows this cell should span
runat Specifies that the control is a server control.  Must be set to "server"
VerticalAlign The vertical alignment of the contents in the table cell. Legal values are:
  • Bottom
  • Middle
  • NotSet
  • Top
Wrap A Boolean value that indicates whether the cell's contents should wrap or not

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>


Back

Jump to: Top of Page or HOME or Printer Friendly 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


Validate How we converted to XHTML Validate

IISCart
ASP Ecommerce & Shopping Cart


Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search