
642
|
Chapter 36: The System.Web.UI Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
HtmlControls.HtmlTableCell could represent a <td> or <th> tag, depending on what tag is
provided in the constructor.
Hierarchy
System.Object ➝ System.Attribute ➝ ConstructorNeedsTagAttribute
Valid On
Class
Control
System.Web.UI (system.web.dll)
disposable
class
The Control class defines properties, methods, and events that all server controls in
ASP.NET require. ASP.NET controls do not inherit directly from this class; instead,
they inherit from either the System.Web.UI.HtmlControls.HtmlControl or the System.Web.UI.WebCon-
trols.WebControl class, both of which inherit from the Control class. Similarly, the Page
and UserControl classes inherit from TemplateControl, which inherits from this class.
The Control class contains many of the typical members you would expect in a control,
including properties that reference the root of the control tree (Page) and a collection of
contained controls (Controls). The EnableViewState property determines whether ASP.NET
maintains the control’s state automatically by using a hidden field. The ViewState prop-
erty provides the StateBag collection of state information.
Most Control methods are used transparently by the ASP.NET framework, such as
Render( ), which generates the HTML output of a control, and LoadViewState( ...