Programming Microsoft ASP.NET 4 - Dino Esposito [268]
Among the commonly used controls that inherit directly from Control, you find Repeater, MultiView, Placeholder, and LiteralControl. All other controls in ASP.NET inherit from one of these classes.
Extending a Base Class
The base Control class incorporates a number of features and makes them available to all child controls. A quick list includes view-state management, control identification, naming container capabilities, design-time support, themes, control state, and adaptive rendering. If you choose to inherit from any of the classes in Table 12-1, be prepared to write quite a bit of code because the control you get in the beginning is not particularly rich with concrete functionalities.
You typically inherit from any of those classes if you’re going to write a control that provides unique capabilities that are hard to find in other ASP.NET controls. Inheriting from any of the classes in Table 12-1 is more like building a custom control from scratch, where the effective starting point is determined by the selected base class.
If you opt for inheritance from a concrete control class—that is, a control that provides an observable behavior and user interface—you should strive to add new features or override existing capabilities without altering too much the structure and the personality of the control itself.
A Richer HyperLink Control