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)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class MenuAdapter : WebControlAdapter, 
	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

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, 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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft