System.Web
2.0.0.0
System.Web.UI.WebControls.Adapters.WebControlAdapter
System.Web.UI.IPostBackEventHandler
A modifies the markup or behavior of a control for a specific browser or class of browsers, or acts as a filter on some capability.
By default, the objects in the control are rendered as hyperlinks to accommodate menu navigation. The class maintains state by implementing the interface so that it can respond to and raise specific events during postback. You can extend the class to further customize rendering or behavior of the control.
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. The class uses browser definition files to identify the characteristics of the client browser and to map the adapter to the browser type.
For more information about adaptive rendering in ASP.NET, see Architectural Overview of Adaptive Control Behavior.
Provides the means to modify the behavior of the control for specific browsers.
Constructor
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. After the adapter is found, the control holds a reference to the mapped adapter instance in its property.
Initializes a new instance of the class.
2.0.0.0
Property
System.Web.UI.WebControls.Menu
To be added.
The property provides a way to reference the adapter's corresponding control. When an adapter is associated with a particular control, the .NET Framework will call the life-cycle methods of the adapter in place of or in addition to the life-cycle methods of the control.
Retrieves a strongly typed reference to the control associated with this object.
2.0.0.0
Method
2.0.0.0
System.Void
When an adapter needs to maintain private state information, it can override the and methods. In the case of the class, where the displayed menu hierarchy is dependent on the previously selected object, provides a dictionary of name/value pairs containing the path of the selected item in the menu's hierarchy. The parameter is a object saved by the during a previous request to the page.
If the control is not registered to participate in control state, the adapter must register for control state. Adapter control state is maintained in addition to the state for the control, unlike other life-cycle methods.
Loads any control state information that was saved by the method during a previous request to the page.
An in the form of a dictionary that contains the adapter's state information.
Method
2.0.0.0
System.Void
The method registers the associated control as one that requires control state. By default, the .NET Framework calls the Web server control's own method. However, after the property of the server control is set, the .NET Framework will call the adapter's implementation of the method instead of the control's implementation.
Use the method to initialize settings in the control. During a postback, this is an important phase for managing interaction with existing view-state data. For more information, see Architectural Overview of Adaptive Control Behavior.
Registers the associated control as one that requires control state.
The data associated with this event.
Method
2.0.0.0
System.Void
The method calls an internal OnPreRender method in the class. All other pre-rendering functions of the parent classes, such as data binding, applying styles, and event assignments perform as expected.
By default, the .NET Framework calls the control's method. However, after the property of that control is set, the .NET Framework will call the adapter's implementation of the method instead of the control's implementation.
Use the method to finalize any settings in the control. Changes made to control properties in this phase will be saved to view state, but changes made in the method are not saved. For more information, see Architectural Overview of Adaptive Control Behavior.
Handles the method for the associated control.
The data associated with this event.
Method
System.Void
The method is called when the event is raised, and is used to maintain the navigation path of the menu. The parameter contains a delimited string of menu items that identify the current location in the menu hierarchy.
The page passes the value of to the associated control's method. The associated control also renders the markup element that causes the postback to occur. If the control renders client-side script for postback, the argument from the script is passed in the parameter. If the postback is caused by a simple submit, is null.
Used to maintain the path of the menu when a postback event is raised.
A that represents the path of the current node in the menu hierarchy.
2.0.0.0
Method
System.Void
The method adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the response stream for the client browser. The objects will be rendered individually in the method and the control will be closed with a call to the subsequent method.
Override when you want to implement custom behavior. For example, override the method to write multiple tags to the response stream before any control content, such as <table><tr><td>. Use the method in conjunction with the method to assure opening and closing tag consistency in your output.
Adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the browser or device.
The instance containing methods to build and render the device-specific output.
2.0.0.0
Method
System.Void
The method writes the objects of the associated control to the output stream as hyperlinks. The method is called from the method and is used to perform modifications to the markup code that is rendered to a device browser.
Control properties should be set prior to this phase of the life cycle, and only the actual markup creation for the control done here. Changes made to the control in this stage of the life cycle are not saved to view state. For saving changes made to the control, override the event.
Writes the associated menu items in the associated control to the output stream as a series of hyperlinks.
The containing methods to build and render the device-specific output.
2.0.0.0
Method
System.Void
The method writes the markup for the closing tag of the control to the output stream emitted to the response stream for the client browser. The attributes, style attributes, and opening tag are rendered in the method. The objects are rendered individually in the method.
Override when you want to implement custom behavior. For example, override the method to write multiple closing tags to the response stream after any control content, such as </td></tr></table>. Use the method in conjunction with the method to assure opening and closing tag consistency in your output.
Creates final markup and writes the markup for the closing tag of the control to the output stream emitted to the browser or device.
The instance containing methods to build and render the device-specific output.
2.0.0.0
Method
2.0.0.0
System.Void
The method is called from the method to retrieve the styles and spacing attributes from the object and apply them to a newly created hyperlink element. The menu hierarchy is traversed in the method and will call the method to render each item. Each item is rendered as a hyperlink and inherits the properties and styles of the specified control. The hyperlink rendered to the page is one of the following:
-
A postback event to open or select the item.
-
A link to navigate to the target specified in the property of the control.
Renders a single menu item as a hyperlink.
The instance containing methods to build and render the device-specific output.
The object containing the properties to write to the response stream.
The position of the specified object in the menu hierarchy.
Method
2.0.0.0
System.Object
The method uses the control state to maintain the current navigation path of the menu. When an adapter needs to maintain private state information, it can override the and methods. An adapter might maintain private control state when there are complex features that need to maintain state across requests, separate from the associated control's state. The adapter needs to register for control state during the method call in every request.
Saves any changes to the adapter private control state that have occurred since the page was posted back to the server.
An that contains the adapter's control state information as a .
Method
2.0.0.0
System.Void
The method enables the class to process an event that is raised when a page is posted back to the server. The page passes to the method.
Enables the class to process an event raised when a page is posted back to the server.
A that contains an optional event argument to pass to the event handler.