Name
HtmlTable
Synopsis
This class provides a powerful way to access the HTML <table>
element. You
can also use it to dynamically generate an HTML table by adding HtmlTableRow
objects to the Rows
collection and
adding HtmlTableCell
objects to
each row. Programmatically created tables must be recreated with every postback.
Most other properties for the HtmlTable
class correspond to
formatting options, including the background color
(BgColor
), alignment
(Align
), and dimensions
(Height
and Width
). You can also set
values in pixels for the width of the border around the table
(Border
), the spacing
between cells
(CellSpacing
), and the
spacing between cell borders and content
(CellPadding
).
Public Class HtmlTable : Inherits HtmlContainerControl ' Public Constructors Public Sub New() ' Public Instance Properties Public Property Align As String Public Property BgColor As String Public Property Border As Integer Public Property BorderColor As String Public Property CellPadding As Integer Public Property CellSpacing As Integer Public Property Height As String Overrides Public Property InnerHtml As String Overrides Public Property InnerText As String Overridable Public ReadOnly Property Rows As HtmlTableRowCollection Public Property Width As String ' Protected Instance Methods Overrides Protected Function CreateControlCollection( ) As ControlCollection Overrides Protected Sub RenderChildren( ByVal writer As System.Web.UI.HtmlTextWriter) Overrides Protected Sub RenderEndTag( ByVal writer As ...
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.