| ControlAdapter | .NET 1.1 |
| System.Web.UI.MobileControls.Adapters (system.web.mobile.dll) | abstract class |
The ControlAdapter provides an abstract base class that is used to derive the device-specific adapter classes in this namespace. The ControlAdapter provides a default implementation of the System.Web.UI.MobileControls.IControlAdapter interface required for all control adapters. It defines methods for handling postback and viewstate data, and rendering the actual control content (through the System.Web.UI.MobileControls.IControlAdapter.Render( ) method). Controls that derive from ControlAdapter should use the base implementation of the Render( ) method for rendering all child controls. This allows the adapter to be used with composite controls.
Most control adapters will not derive directly from this class. For example, all the WML-specific adapters derive from WmlControlAdapter, which in turn derives from the base ControlAdapter class. This is also true of HTML adpters, which derive form HtmlControlAdapter.
public abstract classControlAdapter : System.Web.UI.MobileControls.IControlAdapter { // Protected Constructorsprotected
ControlAdapter ( ); // Protected Static Fields protected static readonly int
BackLabel ; // =0 protected static readonly int
CallLabel ; // =8 protected static readonly int
GoLabel ; // =1 protected static readonly int
LinkLabel ; // =7 protected static readonly int
MoreLabel ; // =3 protected static readonly int
NextLabel ; // =5 protected static readonly int
OKLabel ; // =2 protected static readonly int
OptionsLabel ; // =4 protected static readonly int
PreviousLabel ; // =6 // Public Instance Properties public MobileControl
Control {set; get; } // implements System.Web.UI.MobileControls.IControlAdapter public virtual MobileCapabilities
Device {get; } public virtual int
ItemWeight {get; } // implements System.Web.UI.MobileControls.IControlAdapter public virtual MobilePage
Page {set; get; } // implements System.Web.UI.MobileControls.IControlAdapter public Style
Style {get; } public virtual int
VisibleWeight {get; } // implements System.Web.UI.MobileControls.IControlAdapter // Public Instance Methods public virtual void
CreateTemplatedUI (bool
doDataBind ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual bool
HandlePostBackEvent (string
eventArgument ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
LoadAdapterState (object
state ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual bool
LoadPostData (string
key , System.Collections.Specialized.NameValueCollection
data , object
controlPrivateData , out bool
dataChanged ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
OnInit (EventArgs
e ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
OnLoad (EventArgs
e ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
OnPreRender (EventArgs
e ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
OnUnload (EventArgs
e ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual void
Render (System.Web.UI.HtmlTextWriter
writer ); // implements System.Web.UI.MobileControls.IControlAdapter public virtual object
SaveAdapterState ( ); // implements System.Web.UI.MobileControls.IControlAdapter // Protected Instance Methods protected virtual int
CalculateOptimumPageWeight ( int
defaultPageWeight ); protected string
GetDefaultLabel (int
labelID ); protected void
RenderChildren (System.Web.UI.HtmlTextWriter
writer ); }
HtmlControlAdapter, WmlControlAdapter