System.Web 2.0.0.0 System.Web.UI.Adapters.ControlAdapter

The class is the base class from which Web controls inherit. It defines many properties common to all Web controls. For more information, see .

A object is a component that substitutes certain class or inherited methods and events in its execution life cycle to allow browser- or markup-specific handling. The .NET Framework maps a single control adapter to a derived object for each client request.

An adapter modifies a control behavior for a specific browser or class of browsers or acts as an arbitrary filter on some capability. Much of the adaptability in rendering behavior can be encapsulated in the specialized classes that derive from the class. Therefore, it is likely that a single adapter can be used for a number of browser class behaviors or that inclusion of the adaptability in the classes might make the use of a control adapter unnecessary.

Controls themselves do not necessarily require an adapter. If controls are extended through composition, generally the adapters for the child controls are sufficient.

Each control has explicit mappings to adapters through the .browser definition files. Thus, any access to the property of uses the object extracted from the .browser definition files to perform the lookup for the mapping of the adapter to control.

During processing, the .NET Framework intercepts calls to the overridable methods of a control that could be target-specific. If a control adapter is attached, the .NET Framework calls the associated adapter methods. For more information, see .

The rendering for a typically consists of a beginning and ending tag, and some inner markup between the beginning and ending tags. The tags are defined when the is created. For more information, see .

The tags are generated by the and methods, respectively. The inner markup is generated by the method.

The method generates all markup, by calling methods in the following order:

.

.

.

The property returns true only if the and all its parent controls are enabled. The property returns a strongly typed reference to the .

Customizes rendering for the Web control to which the control adapter is attached, to modify the default markup or behavior for specific browsers.

- Constructor

  The .NET Framework internally constructs a new instance of the class when it creates the corresponding object.

  Initializes a new instance of the class.

  2.0.0.0
- Property
  System.Web.UI.WebControls.WebControl To be added.

  When a object is attached to a object, the .NET Framework calls on the adapter life-cycle methods instead of the control methods. For more information, see .

  Gets a reference to the Web control to which this control adapter is attached.

  2.0.0.0
- Property
  System.Boolean To be added.

  The property provides access for the adapter and any of its derived classes to the property. scans the hierarchy of parent controls and returns true only if the Web control and all its parents are enabled.

  Gets a value indicating whether the Web control and all its parent controls are enabled.

  2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method generates target-specific markup to send to the client browser. is called in place of the method if a object is attached to a object.

  Generates the target-specific markup for the control to which the control adapter is attached.

  The containing methods to render the target-specific output.
- Method
  System.Void ``

  Override the method to write additional markup tags or add attributes to the beginning tag for the object. Use in conjunction with the method to assure beginning and ending tag consistency.

  Creates the beginning tag for the Web control in the markup that is transmitted to the target browser.

  The containing methods to render the target-specific output. 2.0.0.0
- Method
  System.Void ``

  The method generates the inner markup, between the beginning and ending tags for the control. Typically, markup is generated by , which calls methods in the following order:

  .

  .

  .

  Override to generate target-specific inner markup to send to the client browser.

  The base method calls . The base method calls , which in turn calls . Thus, overrides of should call the base method only if its processing is in addition to, rather than instead of, .

  Generates the target-specific inner markup for the Web control to which the control adapter is attached.

  The containing methods to render the target-specific output. 2.0.0.0
- Method
  System.Void ``

  Override the method to write additional markup tags or add attributes to the ending tag for the object. Use in conjunction with the method to assure beginning and ending tag consistency.

  Creates the ending tag for the Web control in the markup that is transmitted to the target browser.

  The containing methods to render the target-specific output. 2.0.0.0