HideDisabledControlAdapter Class
Provides rendering capabilities for the associated Web control to modify the default markup or behavior for a specific browser.
System.Web.UI.Adapters::ControlAdapter
System.Web.UI.WebControls.Adapters::WebControlAdapter
System.Web.UI.WebControls.Adapters::HideDisabledControlAdapter
Assembly: System.Web (in System.Web.dll)
The HideDisabledControlAdapter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | HideDisabledControlAdapter | Initializes a new instance of the HideDisabledControlAdapter class. |
| Name | Description | |
|---|---|---|
![]() | Browser | Gets a reference to the browser capabilities of the client making the current HTTP request. (Inherited from ControlAdapter.) |
![]() | Control | Gets a reference to the Web control to which this control adapter is attached. (Inherited from WebControlAdapter.) |
![]() | IsEnabled | Gets a value indicating whether the Web control and all its parent controls are enabled. (Inherited from WebControlAdapter.) |
![]() | Page | Gets a reference to the page where the control associated with this adapter resides. (Inherited from ControlAdapter.) |
![]() | PageAdapter | Gets a reference to the page adapter for the page where the associated control resides. (Inherited from ControlAdapter.) |
| Name | Description | |
|---|---|---|
![]() | BeginRender | Called prior to the rendering of a control. In a derived adapter class, generates opening tags that are required by a specific target but not needed by HTML browsers. (Inherited from ControlAdapter.) |
![]() | CreateChildControls | Creates the target-specific child controls for a composite control. (Inherited from ControlAdapter.) |
![]() | EndRender | Called after the rendering of a control. In a derived adapter class, generates closing tags that are required by a specific target but not needed by HTML browsers. (Inherited from ControlAdapter.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | LoadAdapterControlState | Loads adapter control state information that was saved by SaveAdapterControlState during a previous request to the page where the control associated with this control adapter resides. (Inherited from ControlAdapter.) |
![]() | LoadAdapterViewState | Loads adapter view state information that was saved by SaveAdapterViewState during a previous request to the page where the control associated with this control adapter resides. (Inherited from ControlAdapter.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnInit | Overrides the OnInit method for the associated control. (Inherited from ControlAdapter.) |
![]() | OnLoad | Overrides the OnLoad method for the associated control. (Inherited from ControlAdapter.) |
![]() | OnPreRender | Overrides the OnPreRender method for the associated control. (Inherited from ControlAdapter.) |
![]() | OnUnload | Overrides the OnUnload method for the associated control. (Inherited from ControlAdapter.) |
![]() | Render | Writes the associated Web control to the output stream as HTML. (Overrides WebControlAdapter::Render(HtmlTextWriter).) |
![]() | RenderBeginTag | Creates the beginning tag for the Web control in the markup that is transmitted to the target browser. (Inherited from WebControlAdapter.) |
![]() | RenderChildren | Generates the target-specific markup for the child controls in a composite control to which the control adapter is attached. (Inherited from ControlAdapter.) |
![]() | RenderContents | Generates the target-specific inner markup for the Web control to which the control adapter is attached. (Inherited from WebControlAdapter.) |
![]() | RenderEndTag | Creates the ending tag for the Web control in the markup that is transmitted to the target browser. (Inherited from WebControlAdapter.) |
![]() | SaveAdapterControlState | Saves control state information for the control adapter. (Inherited from ControlAdapter.) |
![]() | SaveAdapterViewState | Saves view state information for the control adapter. (Inherited from ControlAdapter.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The HideDisabledControlAdapter class adapts the associated WebControl control to modify the default markup or behavior for a specific browser. You can extend the HideDisabledControlAdapter class to further customize rendering of the WebControl control.
Adapters are compiled .NET Framework components that take over one or more stages in the life cycle of a page or control. Extending the HideDisabledControlAdapter class will provide access to the life-cycle stages of the WebControl control. For more information, see Architectural Overview of Adaptive Control Behavior.
The initial request for an adapter causes the .NET Framework to search for a mapped adapter for the control given the characteristics of the requesting browser. Browser definition files are used by the HttpBrowserCapabilities class to identify the characteristics of the client browser and map the adapter to the browser type. For more information, see Architectural Overview of Adaptive Control Behavior.
For a description of the adaptive rendering architecture of ASP.NET and a step-by-step walkthrough that shows how to implement a control adapter and map it to a control, see "Authoring ASP.NET Server Control Adapters: An Introduction" in the MSDN Library at http://msdn.microsoft.com/library.
The following code example shows how to extend the HideDisabledControlAdapter class to display a Label control in an enabled and disabled state. This example contains three parts:
An adapter derived from the HideDisabledControlAdapter class.
The .aspx file that incorporates the Label control and device-specific content.
A browser file to link the adapter to a device type.
The following code example demonstrates how to extend the HideDisabledControlAdapter class.
The following code example demonstrates how to declare a Label control with device-specific content.
The following code example shows how to link the Label control to the custom adapter for browsers running on Windows CE .NET.
<browsers>
<browser refID="WinCE">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Label"
adapterType="Contoso.HideDisabledControlContosoAdapter" />
</controlAdapters>
</browser>
<browser refID="IE">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Label"
adapterType="Contoso.HideDisabledControlContosoAdapter" />
</controlAdapters>
</browser>
</browsers>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


