ASP.NET Namespaces

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.

System.Web.UI Namespace

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:



Attribute Collection

Provides all object-model access declared in the opening tag of an ASP.NET server control element. The class cannot be inherited.


Offers a base set of functionality for classes involved in parsing ASP.NET page requests as well as server controls.


Requires a tag name in the server control constructor.


Defines all properties, methods, and events shared by all ASP.NET server controls.


Supports the page parser in constructing a control and its child controls.


Specifies a ControlBuilderClass for constructing a custom control within the parser. The class cannot be inherited.


Provides a collection container for ASP.NET to maintain a list of its child controls.


Contains the HTML cascading style sheets inline style attributes for a specified HTML server control.


Lends support for RAD developers to generate and parse data-binding expression syntax. This class cannot be inherited.


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.


Provides a collection of DataBinding objects for an ASP.NET server control. This class cannot be inherited.


Defines a design-time class that performs control data binding within a designer. This class cannot be inherited.


Creates a control for HTML text to enable handling of <% %> data-binding expressions processed by the ASP.NET server. This class cannot be inherited.


Lends support for an empty control collection.


Provides a text writer for ASP.NET pages and server controls that render HTML content for HTML 3.2 clients.


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.


Provides information for events occurring when a client clicks on an image-based server control. This class cannot be inherited.


Represents HTML elements, text, and other strings on an ASP.NET page not requiring server-side processing.


Serializes the view state for a web forms page. This class cannot be inherited.


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.


Contains two objects that can both be added to an ASP.NET server control’s view state.


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.


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.


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.


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.


Contains helper functions to convert property values to and from strings.


Manages the view state of ASP.NET server controls, including pages. This class cannot be inherited.


Represents an item that is saved in the StateBag class when view state information is persisted between web requests. This class cannot be inherited.


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.


Defines the tag prefix used in a web page to identify controls. This class cannot be inherited.


Supports the page parser when constructing a template and child controls that it contains.


Declares the type of the INamingContainer that will contain the template once it is created.


Provides the Page class and the UserControl class with a base set of functionality.


Specifies the default tag generated for a custom control when it is dragged from a toolbox in a tool, for example, Visual Studio.


Holds three objects that can all be added to an ASP.NET server control’s view state.


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.


Defines the metadata attribute used by ASP.NET server controls to identify a validation property. This class cannot be inherited.


Exposes an array of IValidator references. This class cannot be inherited.


The following table contains the list of System.Web.UI interfaces:




Defines methods used by ASP.NET server controls to provide programmatic access to any attribute declared in the opening tag of a server control.


Permits access to the collection of data-binding expressions on a control at design time.


Identifies a container control that creates a new ID namespace within a Page object’s control hierarchy. This is a marker interface only.


Defines the method that ASP.NET server controls must implement to recognize when elements, either XML or HTML, are parsed.


Defines methods that ASP.NET server controls must implement to automatically load post-back data.


Defines properties and methods that any class must implement to support view state management for a server control.


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.


Defines the properties to implement, and allows designers to access information about a user control at design time.


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.




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.


Specifies the HTML styles available to an HtmlTextWriter or HtmlTextWriter32 object output stream.


Specifies which HTML tags are allowed to be passed to an HtmlTextWriter or HtmlTextWriter32 object output.


Specifies the valid values for the location of the output cache.


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.

.NET & J2EE Interoperability
Microsoft .NET and J2EE Interoperability Toolkit (Pro-Developer)
ISBN: 0735619220
EAN: 2147483647
Year: 2004
Pages: 101
Authors: Simon Guest © 2008-2017.
If you may any questions please contact us: