System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.ComponentModel.IComponent System.Web.UI.IControlBuilderAccessor System.Web.UI.IControlDesignerAccessor System.Web.UI.IDataBindingsAccessor System.Web.UI.IExpressionsAccessor System.Web.UI.IParserAccessor System.Web.UI.IUrlResolutionService System.Web.UI.Themeable(false) System.ComponentModel.Bindable(true) System.ComponentModel.Design.Serialization.DesignerSerializer("Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.Designer("System.Web.UI.Design.ControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.ToolboxItem("System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.ToolboxItemFilter("System.Web.UI", System.ComponentModel.ToolboxItemFilterType.Require) System.ComponentModel.DesignerCategory("Code") System.ComponentModel.DefaultProperty("ID")

This is the primary class that you derive from when you develop custom ASP.NET server controls. does not have any user interface (UI) specific features. If you are authoring a control that does not have a UI, or combines other controls that render their own UI, derive from . If you are authoring a control that does have a UI, derive from or any control in the namespace that provides an appropriate starting point for your custom control.

The class is the base class for all ASP.NET server controls, including custom controls, user controls, and pages. ASP.NET pages are instances of the class, which inherits from the class, and that handle requests for files that have an .aspx extension.

The class can directly or indirectly be used as part of the user interface for your Web application, and as such should be scrutinized to make sure best practices for writing secure code and securing applications are followed.

For general information on these topics, see Overview of Web Application Security Threats, Security Policy Best Practices, and Key Security Concepts. For more specific information, see Securing Standard Controls, How to: Display Safe Error Messages, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to the Validation Controls.

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

- Constructor
  To be added

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.Web.UI.Adapters.ControlAdapter To be added.

  ASP.NET Web pages are usable across a wide range of devices and browsers that can request information from the Web. The property returns the object that renders the control on the requesting device or browser's screen.

  For more information about adapters, see Architectural Overview of Adaptive Control Behavior.

  Gets the browser-specific adapter for the control.

- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` ``

  The method is called immediately after a control is added to the collection.

  Called after a child control is added to the collection of the object.

  The that has been added. The index of the control in the collection.
- Method
  System.Void ``

  Unless you override it, this method automatically adds objects to the server control's object. This collection is accessible through property.

  Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's object.

  An that represents the parsed element. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
  System.Void ``

  The method sets style properties on the control based on skin properties defined in a theme directory. The skin applied is either the default skin for the control or the skin specified in the property. The method is called by ASP.NET for declarative controls placed on a page. You must call the method on any controls created programmatically at run time for style sheet skins to apply to the control. Theme skins are applied automatically. For more information on the difference between themes and cascading style sheets, see ASP.NET Themes Overview.

  Applies the style properties defined in the page style sheet to the control.

  The containing the control.
- Property
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
  System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
  System.String To be added.

  The property contains the application-relative path to the page or user control that contains the current control. For example, if the Web page resides at http://www.contoso.com/application/subdirectory, the property returns "~/subdirectory".

  To return the virtual path ("application/subdirectory"), use the property.

  Gets or sets the application-relative virtual directory of the or object that contains this control.

- Property
  System.Web.UI.Control To be added: an object of type 'Control'

  The property contains a reference to the object that contains the data-binding information for the current control.

  The property is the same as the property, except when the control is part of a template. In that case, the property is set to the that defines the template.

  Gets the control that contains this control's data binding.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Method
  System.Void `` ``

  This property gathers the information necessary about a page's UI hierarchy and passes it to the page's <trace> Element property. When you enable tracing, either for a page or for your application, this information is displayed in the Control Tree section of the trace output. Trace output for a page is appended to the end of the page; while trace output for an application can be viewed from the trace viewer (trace.axd file) which is stored in the application's root directory. For more information about tracing, see ASP.NET Tracing Overview.

  Gathers information about the server control and delivers it to the property to be displayed when tracing is enabled for the page.

  The identifier of the control's parent. A Boolean that indicates whether the view-state size is calculated. 1.0.5000.0 2.0.0.0
- Property
  System.Boolean To be added: an object of type 'bool' To be added

  Gets a value that indicates whether the server control's child controls have been created.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void

  The method is used when child control-state information written to the parent control's control state is overridden as new child controls are created, such as when data-binding child controls in a templated data-bound server control. Calling the method to empty child controls before calling the method reduces the size of the control-state information that must be stored or transmitted.

  When recreating child controls of a object, use the method to clear child control state so that it does not get applied to the new controls inadvertently.

  To clear both the child control state and view state, use the method.

  Deletes the control-state information for the server control's child controls.

- Method
  2.0.0.0
  System.Void

  The method clears all view-state and control-state information for child controls. It is equivalent to calling both the method and the method.

  When recreating child controls of a object, use the method to clear child state so that it does not get applied to the new controls inadvertently.

  Deletes the view-state and control-state information for all the server control's child controls.

- Method
  System.Void

  This method is commonly used when you override the method when developing templated data-bound server controls. If you do not call this method, child control view–state information can be written to a parent server control, only to be overridden when the data is bound.

  When recreating child controls of a , use the method to clear child view state so that it does not get applied to the new controls inadvertently.

  For more information about using this method, see How to: Create Templated User Controls.

  Deletes the view-state information for all the server control's child controls.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  When a Web server control is rendered as an HTML element, the id attribute of the HTML element is set to the value of the property. The value is often used to access the HTML element in client script by using the document.getElementById method. The ID is also often used in CSS rules to specify elements to style. For example, the following CSS style rule selects all span elements that have the id attribute value of ProductIDLabel and sets their background-color attribute to white:

  `span#ProductIDLabel { background-color: white; }`

  ASP.NET provides multiple algorithms for how to generate the property value. You select which algorithm to use for a control by setting its property. The algorithms are identified by the enumeration values that are listed in the following table.

  Value

  Description

  The value is generated by concatenating the values of each parent naming container with the value of the control. In data-binding scenarios where multiple instances of a control are rendered, an incrementing value is inserted in front of the control's value. Each segment is separated by an underscore character (_). This algorithm was used in versions of ASP.NET earlier than ASP.NET 4.

  The value is set to the value of the property. If the control is a naming container, the control is used as the top of the hierarchy of naming containers for any controls that it contains.

  This algorithm is used for controls that are in data-bound controls. The value is generated by concatenating the value of the parent naming container with the value of the control. If the control is a data-bound control that generates multiple rows, the value of the data field specified in the property is added at the end. For the control, multiple data fields can be specified. If the property is blank, a sequential number is added at the end instead of a data-field value. Each segment is separated by an underscore character (_).

  The control inherits the setting of its control.

  The default value of for a page is . The default value of for a control is . Because the default for controls is , the default generation mode is . (However, if you use Visual Studio to convert a Web project to ASP.NET 4 from an earlier version, Visual Studio automatically sets the site default to in the Web.config file.)

  For more information, see ASP.NET Control Identification.

  Gets the control ID for HTML markup that is generated by ASP.NET.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Property
  2.0.0.0
  System.Char To be added.

  The value is generated by concatenating the value of the control and the value of its parent control. Each part of the generated property is separated by the property value. The value always returns an underscore (_).

  Gets a character value representing the separator character used in the property.

- Property
  System.Web.HttpContext a

  This property gives you access to the object for the current Web request. The object provides properties that access the , , , and other objects that contain information about the current HTTP request. It also provides methods that allow you to obtain configuration information and set or clear errors for the request.

  Gets the object associated with the server control for the current Web request.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Web.UI.ControlCollection To be added: an object of type 'ControlCollection'

  On an ASP.NET page, when controls are added declaratively between the opening and closing tags of a server control, ASP.NET automatically adds the controls to the containing server control's . Any HTML tags or text strings that are not processed on the server are treated as objects. These are added to the collection like other server controls.

  The property allows you programmatic access to the instance of the class for any server control. You can add controls to the collection, remove controls from the collection, or iterate through the server controls in the collection.

  Gets a object that represents the child controls for a specified server control in the UI hierarchy.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Method
  System.Void

  When you develop a composite or templated server control, you must override this method. Controls that override the method should implement the interface to avoid naming conflicts.

  For more information, see ASP.NET Web Server Controls Templates and Developing Custom ASP.NET Server Controls.

  Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.

  1.0.5000.0
  2.0.0.0
- Method
  System.Web.UI.ControlCollection

  Override this method in a custom server control if you have created a collection object that is derived from the class. You can then instantiate that collection class in the override of this method.

  Creates a new object to hold the child controls (both literal and server) of the server control.

  A object to contain the current server control's child server controls.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void

  Use this method to bind data from a source to a server control. This method is commonly used after retrieving a dataset through a database query. Most controls perform data binding automatically, which means that you typically do not need to call this method explicitly.

  This method is commonly overridden when you create a custom templated data-bound control. For more information, see How to: Create Templated User Controls and Developing Custom Data-Bound Web Server Controls. When called on a server control, this method resolves all data-binding expressions in the server control and in any of its child controls.

  Binds a data source to the invoked server control and all its child controls.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  Use the method in a scenario when your custom control overrides the method and implements the interface. In this scenario, the custom control calls the method with set to false to ensure that the base class's method gets called.

  The method invokes the method with set to true.

  Calling the method with set to false causes any child controls to be data bound with the method.

  Binds a data source to the invoked server control and all its child controls with an option to raise the event.

  true if the event is raised; otherwise, false.
- Method
  2.0.0.0
  System.Void

  Use the method to bind a data source to the child controls of a server control.

  When called on a server control, this method does not bind data to the control. To bind a server control and all its child controls, call the method.

  Binds a data source to the server control's child controls.

- Event
  System.EventHandler

  This event notifies the server control to perform any data-binding logic that has been written for it.

  Occurs when the server control binds to a data source.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added.

  The property returns true to indicate that the control is being used in the context of a designer. Your custom controls can use this property when design-time behavior is different than run-time behavior.

  Gets a value indicating whether a control is being used on a design surface.

- Method
  System.Void

  Call when you are finished using the . The method leaves the in an unusable state. After calling this method, you must release all references to the control so the memory it was occupying can be reclaimed by garbage collection.

  Enables a server control to perform final clean up before it is released from memory.

  1.0.5000.0
  2.0.0.0
- Event
  System.EventHandler

  Resources that require significant processor time, such as database connections, should be released with this event.

  Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.ComponentModel.DefaultValue(true)
  System.Web.UI.Themeable(false)
  System.ComponentModel.Browsable(false)
  System.Boolean To be added.

  The property indicates whether themes are enabled for a specified control. When the property is true, the application's theme directory is searched for control skins to apply. If no skin for the particular control exists in the theme directory, skins are not applied.

  When the property is false, the theme directory is not searched and the content of the property is not used.

  Themes can be enabled at the page, container, or control level. A control can override the value set by its parent control, or by the containing page.

  Gets or sets a value indicating whether themes apply to this control.

- Property
  System.Boolean To be added: an object of type 'bool'

  View state enables a server control to maintain its state across HTTP requests. View state for a control is enabled if all of the following conditions are met:

  The property for the page is set to true.

  The property for the control is set to true.

  The property for the control is set to or inherits the setting.

  For more information, see the property.

  A server control's view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET uses an instance of the class to store the property values. The values are then passed as a variable to a hidden field when subsequent requests are processed. For more information about view state, see ASP.NET View State Overview.

  There are times when it is appropriate to disable view state, particularly to improve application performance. For example, if you are loading a database request into a server control, set this property to false. If you do not, processor time will be wasted loading view state into the server control that will only be overridden by the database query. If is false, you can use the control state to persist property information that is specific to a control and cannot be turned off like the view state property. For more information on the difference between control state and view state, see Control State vs. View State Example.

  For information about how to enable or disable view state declaratively for an ASP.NET page, see @ Page.

  Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(true)
- Method
  System.Void

  This method first checks the current value of the property. If this value is false, the method is called.

  The method is typically used in composite controls, which are controls that use child controls for some or all their functionality. The method is called in order to make sure that child controls have been created and are ready to process input, to perform data binding, or to perform other tasks.

  The control is an example of a composite control. It creates child controls such as , , , , and controls, which are used to render the HTML table that the generates.

  In most cases, custom server control developers do not have to override this method. If you do override this method, use it in a way similar to the default behavior.

  Determines whether the server control contains child controls. If it does not, it creates child controls.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void

  The method generates an identifier for controls that are contained in another control. Identifiers are generated only for controls that do not have a value assigned to the property.

  Creates an identifier for controls that do not have an identifier assigned.

- Property
  System.ComponentModel.EventHandlerList a

  This property is of type , which uses a linear search algorithm to find entries in the list of delegates. A linear search algorithm is inefficient when working with a large number of entries. Therefore, when you have a large list, finding entries with this property will be slow.

  Gets a list of event handler delegates for the control. This property is read-only.

  1.0.5000.0
  2.0.0.0
- Method
  System.Web.UI.Control ``

  Use to access a control from a function in a code-behind page, to access a control that is inside another container, or in other circumstances where the target control is not directly accessible to the caller. This method will find a control only if the control is directly contained by the specified container; that is, the method does not search throughout a hierarchy of controls within controls. For information about how to find a control when you do not know its immediate container, see How to: Access Server Controls by ID.

  Searches the current naming container for a server control with the specified parameter.

  The specified control, or null if the specified control does not exist.

  The identifier for the control to be found. 1.0.5000.0 2.0.0.0
- Method
  System.Web.UI.Control `` `` To be added

  Searches the current naming container for a server control with the specified and an integer, specified in the parameter, which aids in the search. You should not override this version of the method.

  The specified control, or null if the specified control does not exist.

  The identifier for the control to be found. The number of controls up the page control hierarchy needed to reach a naming container. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.Void

  Use the method to set the initial focus of the Web page to the control. The page will be opened in the browser with the control selected.

  The method causes a call to the page focus script to be emitted on the rendered page. If the page does not contain a control with an HTML ID attribute that matches the control that the method was invoked on, then page focus will not be set. An example where this can occur is when you set the focus on a user control instead of setting the focus on a child control of the user control. In this scenario, you can use the method to find the child control of the user control and invoke its method.

  Sets input focus to a control.

- Method
  2.0.0.0
  System.Collections.IDictionary

  The method returns design-time data for a control.

  Gets design-time data for a control.

  An containing the design-time data for the control.

- Property
  System.Boolean To be added: an object of type 'bool'

  You can avoid unnecessary calls to the method by using this property to verify that any child controls of the server control are storing view-state information.

  Gets a value indicating whether the current server control's child controls have any saved view-state settings.

  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean

  Since this method simply determines if any child controls exist, it can enhance performance by allowing you to avoid an unnecessary property call. Calls to this property require a object to be instantiated. If there are no children, this object creation wastes server resources.

  Determines if the server control contains any child controls.

  true if the control contains other controls; otherwise, false.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Boolean To be added.

  Returns a value indicating whether events are registered for the control or any child controls.

  true if events are registered; otherwise, false.

- Property
  System.String To be added: an object of type 'string'

  Setting this property on a server control provides you with programmatic access to the server control's properties, events, and methods. This property can be set by Web developers by declaring an attribute in the opening tag of an ASP.NET server control.

  If this property is not specified for a server control, either declaratively or programmatically, you can obtain a reference to the control through its parent control's property.

  Only combinations of alphanumeric characters and the underscore character ( _ ) are valid values for this property. Including spaces or other invalid characters will cause an ASP.NET page parser error.

  Gets or sets the programmatic identifier assigned to the server control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.Themeable(false)
  System.Web.UI.Filterable(false)
  System.ComponentModel.ParenthesizePropertyName(true)
  System.ComponentModel.MergableProperty(false)
- Property
  2.0.0.0
  System.Char To be added.

  The character contained in the property is used to separate the control identifiers for child controls. The ID separator character is appended to the property.

  Gets the character used to separate control identifiers.

- Event
  System.EventHandler

  Server controls should perform any initialization steps that are required to create and set up an instance. You cannot use view-state information within this event; it is not populated yet. You should not access another server control during this event, regardless of whether it is a child or parent to this control. Other server controls are not certain to be created and ready for access. For more information on server control events, see ASP.NET Web Server Control Event Model.

  Occurs when the server control is initialized, which is the first step in its lifecycle.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added. To be added.

  Gets a value indicating whether controls contained within this control have control state.

- Method
  System.Boolean

  When this method returns true, the server control's collection holds a single literal control.

  Determines if the server control holds only literal content.

  true if the server control contains solely literal content; otherwise false.

  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added: an object of type 'bool'

  For a sample custom server control that uses this property, see Templated Server Control and Designer Sample

  Gets a value that indicates whether the server control is saving changes to its view state.

  1.0.5000.0
  2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added.

  View state can be enabled at the page, container, or control level. When view state is disabled at the page or container level, view state is disabled for all controls contained by the page or container. The property indicates whether view state is enabled by pages, containers, or controls.

  It is possible for the property and the property to be different. For example, if the containing the control has view state disabled, the property can be true while the property is false.

  Gets a value indicating whether view state is enabled for this control.

- Event
  System.EventHandler

  Notifies the server control to perform any processing steps that are set to occur on each page request. You can access view state information and Web form POST data from this event. You can also access other server controls within the page's control hierarchy.

  If you set a custom template in a control during the Page_Load event, the text values of child controls in the custom template will be lost. This occurs because the form values have already been loaded.

  Occurs when the server control is loaded into the object.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void `` To be added.

  Override this method when you need to specify how a custom server control restores its control state. For more information, see ASP.NET State Management Overview.

  Restores control-state information from a previous page request that was saved by the method.

- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  Restores view-state information from a previous page request that was saved by the method.

  An that represents the control state to be restored. 1.0.5000.0 2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added.

  By default, when a parent control loads view state into child controls it creates, it does this by the position of each child control in the parent control's collection. When view state is initially applied, all child controls might not have been created. In this case, the view state for controls not yet created is saved, and applied when the child controls are created later.

  For a parent control to apply view state to its child controls, two conditions must be met:

  On postback, the parent control must create the child controls in exactly the same order as the previous request so that the order of the controls remains consistent.

  After postback, any child controls created must be added to the end of the parent control's collection.

  If these two conditions cannot be met, as in the case of the delayed creation of a child control, the parent control can load view state by using . To set the property to true, use the metadata attribute for the parent control.

  Gets a value indicating whether the control participates in loading its view state by instead of index.

- Method
  System.String ``

  This method can only be used by server controls that have permissions to read files and which are part of fully trusted .dll files, such as System.Web.dll. This helps prevent security breaches.

  Retrieves the physical path that a virtual path, either absolute or relative, maps to.

  The physical path to the requested file.

  A relative or root relative URL. 1.0.5000.0 2.0.0.0
- Property
  System.Web.UI.Control To be added: an object of type 'Control'

  Each page in an ASP.NET Web application contains a hierarchy of controls. This hierarchy is not dependent on whether a control generates UI visible to the user. The naming container for a given control is the parent control above it in the hierarchy that implements the interface. A server control that implements this interface creates a unique namespace for the property values of its child server controls. You can use the property of a naming container's child control to get a reference to its parent container.

  Creating a unique namespace for server controls is particularly important when you bind Web server controls to data, such as the and server controls. When multiple entries in the data source create multiple instances of a server control that is a child of the repeating control, the naming container ensures that each instance of these child controls have property values that do not conflict. The default naming container for a page is the instance of the class that is generated when that page is requested.

  The property contains the value that is rendered as the element's id attribute in the HTML markup. Depending on the value that you assign to the property, the value that is generated for the property might include the ID of the object. When you set to , the value does not include the ID of the object. When you set to either or , the value will include the ID from the object. For more information, see ASP.NET Control Identification.

  Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same property value.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Method
  System.Boolean `` ``

  ASP.NET server controls such as the , and Web controls can contain child controls that raise events. For example, each row in a control can contain one or more buttons created dynamically by templates. Rather than each button raising an event individually, events from the nested controls are "bubbled"—that is, they are sent to the naming container. The naming container in turn raises a generic event called with parameter values. These values allow you to determine which individual control that raised the original event. By responding to this single event, you can avoid having to write individual event-handling methods for child controls.

  Determines whether the event for the server control is passed up the page's UI server control hierarchy.

  true if the event has been canceled; otherwise, false. The default is false.

  The source of the event. An object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  This method notifies a server control to perform any logic for binding data that is associated with it.

  If you want to handle the event, you should override this event-handling method. This ensures that all delegates attached to the event are invoked.

  Raises the event.

  An object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  ASP.NET calls this method to raise the event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's method to notify subscribers to the event.

  Raises the event.

  An object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  ASP.NET calls this method to raise the event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's method to notify subscribers to the event.

  Raises the event.

  The object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  ASP.NET calls this method to raise the event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's method to notify subscribers to the event.

  Raises the event.

  An object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  ASP.NET calls this method to raise the event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's method to notify subscribers to the event.

  Raises the event.

  An object that contains event data. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.IO.Stream ``

  The method returns a object that can be used to read the contents of the file specified in the parameter. The path parameter can be either a relative or root URL without a protocol (such as "~/mySite/myFile.txt), or a physical path, either local ("c:\mySite\myFile.txt") or UNC ("\\myServer\myFile.txt").

  The method uses file access security to control access to the specified file. If the current ASP.NET user does not have access to the file, then the file is not opened and an exception is thrown to indicate that access was denied. If the parameter specified a relative path, the exception does not include information about the physical path to the requested file.

  Gets a used to read a file.

  A that references the desired file.

  The path to the desired file.
- Property
  System.Web.UI.Page To be added: an object of type 'Page'

  This property's value reflects the name of the .aspx file that contains the server control.

  Gets a reference to the instance that contains the server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Bindable(false)
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Property
  System.Web.UI.Control To be added: an object of type 'Control'

  Whenever a page is requested, a hierarchy of server controls on that page is built. This property allows you to determine the parent control of the current server control in that hierarchy, and to program against it.

  Gets a reference to the server control's parent control in the page control hierarchy.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Event
  System.EventHandler

  Use this event to perform any updates before the server control is rendered to the page. Any changes in the view state of the server control can be saved during this event. Such changes made in the rendering phase will not be saved.

  Occurs after the object is loaded but prior to rendering.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` ``

  ASP.NET server controls such as the , and Web controls can contain child controls that raise events. For example, each row in a control can contain one or more buttons created dynamically by templates. Rather than each button raising an event individually, events from the nested controls are "bubbled"—that is, they are sent to the control's parent. The parent in turn raises a generic event called with parameter values. These values allow you to determine which individual control that raised the original event. By responding to this single event, you can avoid having to write individual event-handling methods for child controls.

  While you cannot override this method, controls you author can handle or raise bubbled events by overriding the method.

  Assigns any sources of the event and its information to the control's parent.

  The source of the event. An object that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Void ``

  The method is called immediately after a control is removed from the collection.

  Called after a child control is removed from the collection of the object.

  The that has been removed.
- Method
  System.Void ``

  When developing custom server controls, you can override this method to generate content for an ASP.NET page.

  Sends server control content to a provided object, which writes the content to be rendered on the client.

  The object that receives the server control content. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  This method notifies ASP.NET to render any Active Server Pages (ASP) code on the page. If no ASP code exists on the page, this method renders any child controls for the server control. This method is called by the method.

  Outputs the content of a server control's children to a provided object, which writes the content to be rendered on the client.

  The object that receives the rendered content. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  If a server control's property is set to true, this method determines whether tracing is enabled for the page. If so, it stores trace information associated with the control, and renders the server control content to the page.

  This method is automatically called by the page during the rendering, but can be overridden by custom control developers.

  Outputs server control content to a provided object and stores tracing information about the control if tracing is enabled.

  The object that receives the control content. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.Void `` ``

  ASP.NET Web pages are usable across a wide range of devices and browsers that can request information from the Web. The property returns the object that renders the control on the requesting device or browser's screen.

  For more information about adapters, see Architectural Overview of Adaptive Control Behavior.

  If a server control's property is set to true and tracing is enabled for the page, then trace information associated with the control is captured.

  Outputs server control content to a provided object using a provided object.

  The that receives the control content. The that defines the rendering.
- Method
  2.0.0.0
  System.Web.UI.Adapters.ControlAdapter

  ASP.NET Web pages are viewable across a wide range of devices that are capable of requesting pages from the Web. The method returns the control adapter responsible for rendering the control on the specific browser or device that requested the ASP.NET page.

  The specific adapter type returned depends on the descendent type of the class that is being rendered.

  For more information about adapters, see Architectural Overview of Adaptive Control Behavior.

  Gets the control adapter responsible for rendering the specified control.

  A that will render the control.

- Method
  2.0.0.0
  System.String ``

  Use the method to return a URL string suitable for use by the client to access resources on the Web server, such as image files, links to additional pages, and so on.

  The URL returned by this method is relative to the folder containing the source file in which the control is instantiated. Controls that inherit this property, such as and , will return a fully qualified URL relative to the control.

  Gets a URL that can be used by the browser.

  A fully qualified URL to the specified resource suitable for use on the browser.

  A URL relative to the current page.
- Method
  System.String ``

  If the parameter contains an absolute URL, the URL is returned unchanged. If the parameter contains a relative URL, that URL is changed to a relative URL that is correct for the current request path, so that the browser can resolve the URL.

  For example, consider the following scenario:

  A client has requested an ASP.NET page that contains a user control that has an image associated with it.

  The ASP.NET page is located at /Store/page1.aspx.

  The user control is located at /Store/UserControls/UC1.ascx.

  The image file is located at /UserControls/Images/Image1.jpg.

  If the user control passes the relative path to the image (that is, /Store/UserControls/Images/Image1.jpg) to the method, the method will return the value /Images/Image1.jpg.

  This method uses the property to resolve to the absolute URL. The returned URL is for client use.

  For more information on resource paths in a Web site, see ASP.NET Web Site Paths.

  For mobile Web pages only, if your application relies on cookieless sessions or might receive requests from mobile browsers that require cookieless sessions, using a tilde ("~") in a path can result in inadvertently creating a new session and potentially losing session data. To set a property with a path such as "~/path", resolve the path by calling the with an argument such as "~/path" before assigning it to the property.

  Converts a URL into one that is usable on the requesting client.

  The converted URL.

  The URL associated with the property. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.Object

  Use the method to save state information required for the operation of a specific control. This control-state data is stored separately from the control's view-state data.

  Custom controls using control state must call the method on the before saving control state.

  Saves any server control state changes that have occurred since the time the page was posted back to the server.

  Returns the server control's current state. If there is no state associated with the control, this method returns null.

- Method
  System.Object

  View state is the accumulation of the values of a server control's properties. These values are automatically placed in the server control's property, which is an instance of the class. This property's value is then persisted to a string object after the save state stage of the server control life cycle. For more information, see Introduction to the ASP.NET Page Life Cycle.

  When view state is saved, this string object is returned to the client as a variable that is stored in an HTML HIDDEN element. When you author a custom server control with a custom view state, the view state can be managed explicitly with the and methods. For more information, see ASP.NET State Management Overview. For information on implementing a custom session-state provider, see Implementing a Session-State Store Provider.

  Saves any server control view-state changes that have occurred since the time the page was posted back to the server.

  Returns the server control's current view state. If there is no view state associated with the control, this method returns null.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method saves design-time data for a control.

  Sets design-time data for a control.

  An containing the design-time data for the control.
- Method
  System.Void ``

  This method is supplied for implementation purposes only; you should never call it directly.

  Assigns an event handler delegate to render the server control and its content into its parent control.

  The information necessary to pass to the delegate so that it can render the server control. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
- Property
  System.ComponentModel.ISite a

  A site binds a object to a object and enables communication between the two. It also provides a way for the container to manage its components.

  Gets information about the container that hosts the current control when rendered on a design surface.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Property
  2.0.0.0
  System.Web.UI.Filterable(false)
  System.ComponentModel.DefaultValue("")
  System.ComponentModel.Browsable(false)
  System.String To be added.

  Skins available to a control are contained in one or more skin files in a theme directory. The property specifies which of these skins to apply to the control. A skin is specific to a particular control; you cannot share skin settings between controls of different types.

  If you do not set the property, a control uses the default skin if one is defined. For example, if a skin without an ID is defined for an control, then that skin applies to all controls that do not explicitly reference a skin by ID and that are not set to disable themes. If a skin with an ID is defined for an control, then that skin applies only to controls whose property is set to that ID.

  If the skin files in a theme directory do not contain a skin with the specified property, an exception is thrown at run time.

  Gets or sets the skin to apply to the control.

- Property
  2.0.0.0
  System.Web.UI.ControlBuilder To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Method
  2.0.0.0
  System.Collections.IDictionary

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  An of the control state.

- Method
  2.0.0.0
  System.Void `` To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Method
  2.0.0.0
  System.Void `` To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  The interface is used by a control designer to perform design-time actions on the control.

  For a description of this member, see .

- Property
  2.0.0.0
  System.Collections.IDictionary To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  1.0.5000.0
  2.0.0.0
  System.Web.UI.DataBindingCollection To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  1.0.5000.0
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  2.0.0.0
  System.Web.UI.ExpressionBindingCollection To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Method
  1.0.5000.0
  2.0.0.0
  System.Void ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  The object to add.
- Property
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
  System.Web.UI.TemplateControl To be added.

  When a instance is part of a control template, the property contains a reference to the containing control. For more information, see the documentation.

  Gets or sets a reference to the template that contains this control.

- Property
  System.String To be added: an object of type 'string'

  The property specifies the path to the page or user control that contains the current control. For example, if the Web page resides at http://www.contoso.com/application/subdirectory, the property returns "application/subdirectory".

  To return the application-relative virtual path ("~/subdirectory"), use the property.

  Gets the virtual directory of the or that contains the current server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Method
  System.Void

  This method is called automatically at the end of the event in the server control's lifecycle.

  Invoke this method when you develop templated data-bound controls. This method alerts ASP.NET to monitor changes to a server control's view state, which is required when you override the method.

  Causes tracking of view-state changes to the server control so they can be stored in the server control's object. This object is accessible through the property.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  This property differs from the property, in that the property includes the identifier for the server control's naming container. This identifier is generated automatically when a page request is processed.

  This property is particularly important in differentiating server controls contained within a data-binding server control that repeats. The repeating control, which are , , , , and Web server controls (or any custom server controls that you create that include repeating functionality when data bound), serves as the naming container for its child controls. This means that it creates a unique namespace for its child controls so that their property values do not conflict.

  For example, if you include an ASP.NET Web server control in a server control, and assign the control an property value of MyLabel, and the an of MyRepeater. If you bind data to the to an object with three entries, the resulting properties for each instance of the server controls are MyRepeater$ctl00$MyLabel, MyRepeater$ctl01$MyLabel, and MyRepeater$ctl02$MyLabel.

  Gets the unique, hierarchically qualified identifier for the server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
- Event
  System.EventHandler

  Server controls must perform any final clean-up, such as closing files, database connections and discarding objects, during this stage of the control lifecycle before the instance is unloaded.

  Occurs when the server control is unloaded from memory.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.StateBag To be added: an object of type 'StateBag'

  A server control's view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET server controls use this property, which is an instance of the class, to store the property values. The values are then passed as a variable to an HTML hidden input element when subsequent requests are processed. For more information about saving server control view state, see ASP.NET State Management Overview.

  View state is enabled for all server controls by default, but there are circumstances in which you will want to disable it. For more information, see Performance Overview.

  For information about dictionaries and how to use them, see Collections and Data Structures.

  Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Boolean To be added: an object of type 'bool'

  Override this method if you create a custom server control that saves its view state without taking case into account. When you do so multiple objects with the same key, but with different casing, can be stored in the associated with the property.

  Gets a value that indicates whether the object is case-insensitive.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Boolean To be added: an object of type 'bool'

  If this property is false, the server control is not rendered. You should take this into account when organizing the layout of your page.

  If a container control is not rendered, any controls that it contains will not be rendered even if you set the property of an individual control to true. In that case, the individual control returns false for the property even if you have explicitly set it to true. (That is, if the Visible property of the parent control is set to false, the child control inherits that setting and the setting takes precedence over any local setting.)

  Gets or sets a value that indicates whether a server control is rendered as UI on the page.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Bindable(true)
  System.ComponentModel.DefaultValue(true)