Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
MenuAdapter Class
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
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)
Visual Basic (Declaration)
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class MenuAdapter _
    Inherits WebControlAdapter _
    Implements IPostBackEventHandler
Visual Basic (Usage)
Dim instance As MenuAdapter
C#
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class MenuAdapter : WebControlAdapter, 
    IPostBackEventHandler
Visual C++
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class MenuAdapter : public WebControlAdapter, 
    IPostBackEventHandler
JScript
public class MenuAdapter extends WebControlAdapter implements IPostBackEventHandler

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.

  • AspNetHostingPermission 

    for verifying at compilation time that the immediate caller has permission to call into the MenuAdapter class. Associated enumeration: Minimal

  • AspNetHostingPermission 

    for verifying that any class derived from the MenuAdapter class has at least the Minimal trust level. Associated enumeration: Minimal

System..::.Object
  System.Web.UI.Adapters..::.ControlAdapter
    System.Web.UI.WebControls.Adapters..::.WebControlAdapter
      System.Web.UI.WebControls.Adapters..::.MenuAdapter
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker