Export (0) Print
Expand All

MenuAdapter Class

Note: This class is new in the .NET Framework version 2.0.

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)

public class MenuAdapter : WebControlAdapter, IPostBackEventHandler
public class MenuAdapter extends WebControlAdapter implements IPostBackEventHandler
public class MenuAdapter extends WebControlAdapter implements IPostBackEventHandler

The MenuAdapter class adapts the associated Menu control to modify the default markup or behavior for a specific browser. 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 fire specific events during postback. You can extend the MenuAdapter class to further customize rendering or behavior of the Menu control.

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

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. Browser definition files are used by the HttpBrowserCapabilities class to identify the characteristics of the client browser and map the adapter to the browser type.

For a description of the adaptive rendering architecture of ASP.NET and a step-by-step walkthrough that shows how to implement a control adapter and map it to a control, see Authoring ASP.NET Server Control Adapters - in the MSDN Library.

  • 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 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft