Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Week 3. At a Glance
This appendix covers the properties and methods for every ASP.NET server control, including HTML server controls, Web server controls, and validation controls. Also refer to the .NET Framework SDK Documentation for further reference.
All of the following controls inherit the properties described in Table C.1 from the System.Web.UI.Control class.
Table C.1. Properties of the Control Class Inherited by All Server Controls
The ID generated for the control by ASP.NET.
Returns a ControlCollection object that represents all the child controls for the specified control.
Specifies whether the control should maintain its viewstate and the viewstate of any child controls.
Specifies the identifier for the control. This property must be present to enable programmatic control and event handling.
Retrieves a reference to the control's naming container.
Gets the Page object that contains the control.
Gets the control's parent in the UI hierarchy.
Specifies the site information for the control.
Specifies the virtual directory of the page that contains the control.
Specifies the unique, hierarchically qualified identity for the control. This differs from ID because it includes the full object hierarchy of the control.
Specifies whether the control should render on the page.
Table C.2 lists the methods shared by all server controls, inherited from the Control object.
Table C.2. Methods of the Control Class Inherited by All Server Controls
Binds data to the specified control.
Performs any final cleanup before the control is destroyed.
Searches the current container control for a control specified by string. Returns a Control object.
Indicates whether the control has any children.
Outputs control content to an HtmlTextWriter object specified by writer.
Resolves a relative URL to an absolute URL based on the value passed to the TemplateSourceDirectory property.
Table C.3 lists the events shared by all server controls, inherited from the Control object.
Table C.3. Events of the Control Class Inherited by All Server Controls
Occurs when data is bound to the control.
Occurs when the control is released from memory.
Occurs when the control is initialized (this is the first step).
Occurs when the control is loaded to the Page object.
Occurs immediately before the control is rendered.