Control developers have to implement only what
is needed. The relevant namespace for control adapters are System.Web.UI.Adapters and
System.Web.UI.WebControls.Adapters, when targeting nonmobile scenarios.
?– Note There is also a ControlAdapter class in the System.Web.UI.MobileControls.Adapters
namespace for mobile scenarios that we cover later in this chapter.
There are many built-in adapters listed in the .NET Framework documentation in the
System.Web.UI.Adapters namespace, such as the DataBoundControlAdapter and
HideDisabledControlAdapter classes. Table 10-2 lists the key base classes and role in the
adaptive framework.
Table 10-2. Key Classes in the Adaptive Control Framework
Class Description
ControlAdapter Base class for all control adapters
WebControlAdapter Base class for adaptively rendering server controls that inherit from
the WebControl class
PageAdapter Base class for adaptively rendering a web form
CHAPTER 10 ?– OTHER S ERVER C ONTROLS 479
The ControlAdapter class is abstract, providing base methods for adaptive functionality
such as representative methods of the control life cycle like the following:
??? OnInit
??? OnLoad
??? OnPreRender
??? OnUnload
??? Render
??? RenderChildren
These methods are implemented by custom control adapters to alter the corresponding
target control??™s behavior in the control life cycle.
Pages:
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613