MenuAdapter Class

MenuAdapter Class

 

Provides the means to modify the behavior of the Menu control for specific browsers.

Namespace:   System.Web.UI.WebControls.Adapters
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.UI.Adapters.ControlAdapter
    System.Web.UI.WebControls.Adapters.WebControlAdapter
      System.Web.UI.WebControls.Adapters.MenuAdapter

public class MenuAdapter : WebControlAdapter, IPostBackEventHandler

NameDescription
System_CAPS_pubmethodMenuAdapter()

Initializes a new instance of the MenuAdapter class.

NameDescription
System_CAPS_protpropertyBrowser

Gets a reference to the browser capabilities of the client making the current HTTP request.(Inherited from ControlAdapter.)

System_CAPS_protpropertyControl

Retrieves a strongly typed reference to the Menu control associated with this MenuAdapter object.

System_CAPS_protpropertyIsEnabled

Gets a value indicating whether the Web control and all its parent controls are enabled.(Inherited from WebControlAdapter.)

System_CAPS_protpropertyPage

Gets a reference to the page where the control associated with this adapter resides.(Inherited from ControlAdapter.)

System_CAPS_protpropertyPageAdapter

Gets a reference to the page adapter for the page where the associated control resides.(Inherited from ControlAdapter.)

NameDescription
System_CAPS_protmethodBeginRender(HtmlTextWriter)

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.)

System_CAPS_protmethodCreateChildControls()

Creates the target-specific child controls for a composite control.(Inherited from ControlAdapter.)

System_CAPS_protmethodEndRender(HtmlTextWriter)

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.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodLoadAdapterControlState(Object)

Loads any control state information that was saved by the SaveAdapterControlState method during a previous request to the page.(Overrides ControlAdapter.LoadAdapterControlState(Object).)

System_CAPS_protmethodLoadAdapterViewState(Object)

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.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnInit(EventArgs)

Registers the associated Menu control as one that requires control state.(Overrides ControlAdapter.OnInit(EventArgs).)

System_CAPS_protmethodOnLoad(EventArgs)

Overrides the OnLoad method for the associated control.(Inherited from ControlAdapter.)

System_CAPS_protmethodOnPreRender(EventArgs)

Handles the OnPreRender method for the associated Menu control.(Overrides ControlAdapter.OnPreRender(EventArgs).)

System_CAPS_protmethodOnUnload(EventArgs)

Overrides the OnUnload method for the associated control.(Inherited from ControlAdapter.)

System_CAPS_protmethodRaisePostBackEvent(String)

Used to maintain the path of the menu when a postback event is raised.

System_CAPS_protmethodRender(HtmlTextWriter)

Generates the target-specific markup for the control to which the control adapter is attached.(Inherited from WebControlAdapter.)

System_CAPS_protmethodRenderBeginTag(HtmlTextWriter)

Adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the browser or device.(Overrides WebControlAdapter.RenderBeginTag(HtmlTextWriter).)

System_CAPS_protmethodRenderChildren(HtmlTextWriter)

Generates the target-specific markup for the child controls in a composite control to which the control adapter is attached.(Inherited from ControlAdapter.)

System_CAPS_protmethodRenderContents(HtmlTextWriter)

Writes the associated menu items in the associated Menu control to the output stream as a series of hyperlinks.(Overrides WebControlAdapter.RenderContents(HtmlTextWriter).)

System_CAPS_protmethodRenderEndTag(HtmlTextWriter)

Creates final markup and writes the markup for the closing tag of the control to the output stream emitted to the browser or device.(Overrides WebControlAdapter.RenderEndTag(HtmlTextWriter).)

System_CAPS_protmethodRenderItem(HtmlTextWriter, MenuItem, Int32)

Renders a single menu item as a hyperlink.

System_CAPS_protmethodSaveAdapterControlState()

Saves any changes to the adapter private control state that have occurred since the page was posted back to the server.(Overrides ControlAdapter.SaveAdapterControlState().)

System_CAPS_protmethodSaveAdapterViewState()

Saves view state information for the control adapter.(Inherited from ControlAdapter.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIPostBackEventHandler.RaisePostBackEvent(String)

Enables the MenuAdapter class to process an event raised when a page is posted back to the server.

A MenuAdapter modifies the markup or behavior of a Menu control for a specific browser or class of browsers, or acts as a filter on some capability.

By default, the MenuItem objects in the Menu control are rendered as hyperlinks to accommodate menu navigation. The Menu class maintains state by implementing the IPostBackEventHandler interface so that it can respond to and raise specific events during postback. You can extend the MenuAdapter class to further customize rendering or behavior of the Menu 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 HttpBrowserCapabilities 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.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft