|
The path to understanding ASP.NET’s process lies in examining the underlying infrastructure and observing how ASP.NET interacts with the .NET Framework base-class libraries and namespaces. The Framework supports web services and web forms through namespaces that host classes, such as System.Web.UI and System.Web.UI.WebControls. The System.Web.UI namespace contains classes and interfaces that allow you to create controls and pages that appear in your web applications as user interfaces on a web page. A major advantage offered by ASP.NET is running the controls on the server rather than on the client so you can programmatically control them at runtime.
The System.Web.UI namespace hosts the classes and interfaces especially designed for rendering elements on a web form. You can view all classes in the System.Web.UI namespace as a hierarchical tree beginning with the Control class. This is the mother of all controls. Buttons, text boxes, drop-down list boxes, and so on, derive from the Control class. It encapsulates both functionality and user interface properties for all member controls residing in this namespace. Class properties include Controls, Context, ClientID, EnableViewState, ID, NamingContainer, Parent, Site, TemplateSourceDirectory, UniqueID, Visible, and ViewState.
A collection of classes, interfaces, enumerations, and delegates makes up the namespace and are essential for developers to understand so that they can take full advantage of ASP.NET.
This table provides a complete list of System.Web.UI classes:
Class | Description |
---|---|
Attribute Collection | Provides all object-model access declared in the opening tag of an ASP.NET server control element. The class cannot be inherited. |
BaseParser | Offers a base set of functionality for classes involved in parsing ASP.NET page requests as well as server controls. |
ConstructorNeedsTagAttribute | Requires a tag name in the server control constructor. |
Control | Defines all properties, methods, and events shared by all ASP.NET server controls. |
ControlBuilder | Supports the page parser in constructing a control and its child controls. |
ControlBuilderAttribute | Specifies a ControlBuilderClass for constructing a custom control within the parser. The class cannot be inherited. |
ControlCollection | Provides a collection container for ASP.NET to maintain a list of its child controls. |
CssStyleCollection | Contains the HTML cascading style sheets inline style attributes for a specified HTML server control. |
DataBinder | Lends support for RAD developers to generate and parse data-binding expression syntax. This class cannot be inherited. |
DataBinding | Contains information about a single data-binding expression in a server control. This feature enhances RAD development and allows developers to create data-binding expressions at design time. |
DataBindingCollection | Provides a collection of DataBinding objects for an ASP.NET server control. This class cannot be inherited. |
DataBindingHandlerAttribute | Defines a design-time class that performs control data binding within a designer. This class cannot be inherited. |
DataBoundLiteralControl | Creates a control for HTML text to enable handling of <% %> data-binding expressions processed by the ASP.NET server. This class cannot be inherited. |
EmptyControlCollection | Lends support for an empty control collection. |
HTML32TextWriter | Provides a text writer for ASP.NET pages and server controls that render HTML content for HTML 3.2 clients. |
HTMLTextWriter | Writes a sequential series of HTML-specific characters and text to a web forms page. The class enables formatting capabilities used by ASP.NET server controls when rendering HTML content to clients. |
ImageClickEventArgs | Provides information for events occurring when a client clicks on an image-based server control. This class cannot be inherited. |
LiteralControl | Represents HTML elements, text, and other strings on an ASP.NET page not requiring server-side processing. |
LosFormatter | Serializes the view state for a web forms page. This class cannot be inherited. |
Page | Defines an .aspx file or a web forms page. All other pages derive from the ASP.NET page class in the System.Web.UI namespace. |
Pair | Contains two objects that can both be added to an ASP.NET server control’s view state. |
ParseChildrenAttribute | Defines a metadata attribute that a developer uses when developing ASP.NET server controls. Use this attribute to indicate whether XML elements embedded within the ASP.NET server control’s tags should be treated either as properties or as children when the control is used declaratively on a page control. This class cannot be inherited. |
PartialCachingAttribute | Represents a class created when a user control (.ascx file) is specified for output caching, using either the @ OutputCache directive or the PartialCachingAttribute, and is added to the page programmatically. |
PersistChildrenAttribute | Defines a metadata attribute utilized by ASP.NET server controls. The attribute specifies whether, at design time, the child controls of an ASP.NET server control should be persisted as nested inner controls. This class cannot be inherited. |
PersistenceModeAttribute | Defines a metadata attribute that specifies how an ASP.NET server control property or event is persisted to an ASP.NET page. This class cannot be inherited. |
PropertyConverter | Contains helper functions to convert property values to and from strings. |
StateBag | Manages the view state of ASP.NET server controls, including pages. This class cannot be inherited. |
StateItem | Represents an item that is saved in the StateBag class when view state information is persisted between web requests. This class cannot be inherited. |
StaticPartialCachingControl | Represents an instance of the UserControl class when it has been specified for output caching and included declaratively in a page or another user control. |
TagPrefixAttribute | Defines the tag prefix used in a web page to identify controls. This class cannot be inherited. |
TemplateBuilder | Supports the page parser when constructing a template and child controls that it contains. |
TemplateContainerAttribute | Declares the type of the INamingContainer that will contain the template once it is created. |
TemplateControl | Provides the Page class and the UserControl class with a base set of functionality. |
ToolboxDataAttribute | Specifies the default tag generated for a custom control when it is dragged from a toolbox in a tool, for example, Visual Studio. |
Triplet | Holds three objects that can all be added to an ASP.NET server control’s view state. |
UserControl | Represents an .ascx file, requested from a server that hosts an ASP.NET web application. The file must be called from a web forms page, or a parser error will occur. |
UserControl ControlBuilder | Supports the page parser when constructing a user control and any child user controls that it contains. |
ValidationPropertyAttribute | Defines the metadata attribute used by ASP.NET server controls to identify a validation property. This class cannot be inherited. |
ValidationCollection | Exposes an array of IValidator references. This class cannot be inherited. |
The following table contains the list of System.Web.UI interfaces:
Interface | Description |
---|---|
IAttributeAccessor | Defines methods used by ASP.NET server controls to provide programmatic access to any attribute declared in the opening tag of a server control. |
IDataBindingsAccessor | Permits access to the collection of data-binding expressions on a control at design time. |
INamingContainer | Identifies a container control that creates a new ID namespace within a Page object’s control hierarchy. This is a marker interface only. |
IParserAccessor | Defines the method that ASP.NET server controls must implement to recognize when elements, either XML or HTML, are parsed. |
IPostBackDataHandler | Defines methods that ASP.NET server controls must implement to automatically load post-back data. |
IStateMapper | Defines properties and methods that any class must implement to support view state management for a server control. |
ITemplate | Defines the method to implement for populating an ASP.NET server control with child controls when using a control with inline templates declared in an .aspx file. |
IUserControlDesignerAccessor | Defines the properties to implement, and allows designers to access information about a user control at design time. |
IValidator | Defines the properties and methods that objects participating in web forms validation must implement. |
The following table provides a list of System.Web.UI enumerations used when enumerating more than one item.
Enumeration | Description |
---|---|
HtmlTextWriterAttribute | Specifies the HTML attributes that an HTMLTextWriter or HTML32TextWriter object writes to the opening tag of an HTML element when a web request is processed. |
HtmlTextWriterStyle | Specifies the HTML styles available to an HtmlTextWriter or HtmlTextWriter32 object output stream. |
HtmlTextWriterTag | Specifies which HTML tags are allowed to be passed to an HtmlTextWriter or HtmlTextWriter32 object output. |
OutputCacheLocation | Specifies the valid values for the location of the output cache. |
PersistenceMode | Specifies how an ASP.NET server control property or event is persisted declaratively in an .aspx or .ascx file. |
The final item in the System.Web.UI namespace, delegates, contains one item. It describes the method that handles any events raised when a user clicks on an image-based ASP.NET server control. Also, a delegate is a reference type that encapsulates a method that contains a specific signature and return type.
|