1) System.Web.UI.Control (hereinafter referred to as Control )
The control class is the base class for all the ASP. NET server controls, including custom controls, user controls, and pages ... Defines the properties, methods, and events that are shared by all ASP.
namespaces: System.Web.UI
Assemblies: System.Web (in System.Web.dll)
2) System.Web.UI.WebControls.WebControl (hereinafter referred to as WebControl)
The WebControl class is the base class for all the controls in the System.Web.UI.WebControls namespace: It derives from the control class, which defines common properties, methods, and events that are shared by all Web server controls. (MSDN).
But the anti-compilation literal learned that the literal control is directly derived in the System.Web.UI.WebControls namespace from the control class. See
namespaces: System.Web.UI.WebControls
Assemblies: System.Web (in System.Web.dll)
3) System.Web.UI.WebControls. CompositeControl (hereinafter referred to AS CompositeControl )
The CompositeControl class is an abstract class derived from WebControls that implements the basic functionality required for a Web control that contains child controls.
namespaces: System.Web.UI.WebControls
Assemblies: System.Web (in System.Web.dll)
- Control, WebControl, the inheritance relationship between CompositeControl
- System.Object
- System.Web.UI.Control
- System.Web.UI.WebControls.WebControl
- System.Web.UI.WebControls.CompositeControl
When you develop a control, the base class is selected:
1) First, ASP. NET all the standard controls can be used to do the base class, so if the control to be implemented is only a small number of modifications or additions to a standard control, then large can be the standard control to do the base class.
2) When the control to be implemented cannot find a suitable prototype in a standard control, consider the control, WebControl, CompositeControl three base classes. (The choice of the specific base class is shown)
First: initial knowledge of ASP. NET control Development-section I: Control classes and their inheritance relationships