System.Web 2.0.0.0 System.Web.UI.WebControls.HierarchicalDataBoundControl System.Web.UI.INamingContainer System.Web.UI.IPostBackEventHandler System.ComponentModel.Designer("System.Web.UI.Design.WebControls.MenuDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.Web.UI.ControlValueProperty("SelectedValue") System.ComponentModel.DefaultEvent("MenuItemClick")

In this topic:

Introduction

Menu Items

Static Data

Binding to Data

Customizing the User Interface

Events

Accessibility

Declarative Syntax

## Introduction

The control is used to display a menu in an ASP.NET Web page and is often used in combination with a control for navigating a Web site. The control supports the following features:

Data binding that allows the control's menu items to be bound to hierarchal data sources.

Site navigation through integration with the control.

Programmatic access to the object model to dynamically create menus, populate menu items, set properties, and so on.

Customizable appearance through themes, user-defined images, styles, and user-defined templates.

When the user clicks a menu item, the control can either navigate to a linked Web page or simply post back to the server. If the property of a menu item is set, the control navigates to the linked page; otherwise, it posts the page back to the server for processing. By default, a linked page is displayed in the same window or frame as the control. To display the linked content in a different window or frame, use the property of the control.

The property affects every menu item in the control. To specify a window or frame for an individual menu item, set the property of the object directly.

The control displays two types of menus: a static menu and a dynamic menu. The static menu is always displayed in a control. By default, the menu items at the root level (level 0) are displayed in the static menu. You can display additional menu levels (static submenus) within the static menu by setting the property. Menu items (if any) with a higher level than the value specified by the property are displayed in a dynamic menu. A dynamic menu appears only when the user positions the mouse pointer over the parent menu item that contains a dynamic submenu. Dynamic menus automatically disappear after a certain duration. Use the property to specify the duration.

A dynamic menu also disappears when the user clicks outside of the menu.

You can also limit the number of levels displayed in a dynamic menu by setting the property. Menu levels higher than the specified value are discarded.

The control is not designed to be used inside an control. You can add the control only to a page outside an control. controls are used to update selected regions of a page instead of updating the whole page with a postback. For more information, see UpdatePanel Control Overview and Partial-Page Rendering Overview.

## Menu Items

A control is made up of a tree of menu items represented by objects. Menu items at the top level (level 0) are called root menu items. A menu item that has a parent menu item is called a child menu item. All root menu items are stored in the collection. Child menu items are stored in a parent menu item's collection.

Each menu item has a and a property. The value of the property is displayed in the control, while the property is used to store any additional data about the menu item, such as data passed to the postback event associated with the menu item. When clicked, a menu item can navigate to another Web page indicated by the property.

If the property is not set for a menu item, the control simply submits the page to the server for processing when the menu item is clicked.

You can also optionally display an image in a menu item by setting the property.

For more information on menu items, see .

## Static Data

The simplest data model of the control is static menu items. To display static menu items using declarative syntax, first nest opening and closing <Items> tags between the opening and closing tags of the control. Next, create the menu structure by nesting <asp:MenuItem> elements between the opening and closing <Items> tags. Each <asp:MenuItem> element represents a menu item in the control and maps to a object. You can set the properties of each menu item by setting the attributes of its <asp:MenuItem> element. To create submenu items, nest additional <asp:MenuItem> elements between the opening and closing <asp:MenuItem> tags of the parent menu item.

## Binding to Data

The control can use any hierarchal data source control, such as an control or a control. To bind to a hierarchal data source control, set the property of the control to the value of the data source control. The control automatically binds to the specified data source control. This is the preferred method to bind to data.

When binding to a data source where each data item contains multiple properties (such as an XML element with several attributes), a menu item displays the value returned by the ToString method of the data item by default. In the case of an XML element, the menu item displays the element name, which shows the underlying structure of the menu tree but is not very useful otherwise. You can bind a menu item to a specific data item property by using the collection to specify menu item bindings. The collection contains objects that define the relationship between a data item and the menu item it is binding to. You can specify the criteria for binding and the data item property to display in the node. For more information on menu item bindings, see .

You cannot create empty nodes in a control by setting the or properties to the empty string (""). Setting these properties to the empty string has the same effect as not setting the properties. In that case, the control creates a default binding using the property. For more information, see Binding to Databases.

## Customizing the User Interface

There are many ways to customize the appearance of the control. First, you can specify whether the control is rendered horizontally or vertically by setting the property. You can also specify a different style (such as font size and color) for each of the menu item types.

If you use cascading style sheets (CSS) to customize the appearance of the control, use either inline styles or a separate CSS file, but not both. Using both inline styles and a separate CSS file could cause unexpected results. For more information on using style sheets with controls, see ASP.NET Web Server Controls and CSS Styles.

The following table lists the available menu item styles.

Menu item style property

Description

The style settings for a dynamic menu item when the mouse pointer is positioned over it.

The style settings for an individual dynamic menu item.

The style settings for a dynamic menu.

The style settings for the currently selected dynamic menu item.

The style settings for a static menu item when the mouse pointer is positioned over it.

The style settings for an individual static menu item.

The style settings for a static menu.

The style settings for the currently selected static menu item.

Instead of setting the individual style properties, you can specify styles that are applied to menu items based on their level by using the following style collections.

Level style collections

Description

A collection of objects that control the style of the menu items on a level basis.

A collection of objects that control the style of selected menu items on a level basis.

A collection of objects that control the style of the submenu items on a level basis.

The first style in the collection corresponds to the style of the menu items at the first depth level in the menu tree. The second style in the collection corresponds to the style of the menu items at the second depth level in the menu tree, and so on. This is most often used to generate table of contents-style navigation menus where menu items at a certain depth should have the same appearance, regardless of whether they have submenus.

If you use any of the level style collections listed in the previous table to define the style for the control, these style settings override the individual menu item style properties.

Another way to alter the appearance of the control is to customize the images displayed in the control. You can specify your own custom image for the different parts of the control by setting the properties shown in the following table.

Image property

Description

An optional image displayed at the bottom of a dynamic menu item to separate it from other menu items.

An optional image displayed in a dynamic menu item to indicate that it has a submenu.

An optional image displayed at the top of a dynamic menu item to separate it from other menu items.

The image displayed at the bottom of a menu item to indicate that the user can scroll down to view additional menu items.

The image displayed at the top of a menu item to indicate that the user can scroll up to view additional menu items.

An optional image displayed at the bottom of a static menu item to separate it from other menu items.

An optional image displayed in a static menu item to indicate that it has a submenu.

An optional image displayed at the top of a static menu item to separate it from other menu items.

For complete control of the user interface (UI), you can define your own custom templates for the control using the following template properties.

Template property

Description

The template that contains the custom content to render for a dynamic menu item.

The template that contains the custom content to render for a static menu item.

You can control the vertical and horizontal position of a dynamic menu relative to its parent menu item by setting the and properties, respectively. To control the indentation of the static submenu items within a static menu, use the property.

## Events

The control provides several events that you can program against. This allows you to run a custom routine whenever an event occurs. The following table lists the supported events.

Event

Description

Occurs when a menu item is clicked. This event is commonly used to synchronize a control with another control on the page.

Occurs when a menu item is bound to data. This event is commonly used to modify a menu item before it is rendered in a control.

## Accessibility

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.

## Declarative Syntax

`<asp:Menu AccessKey="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CssClass="string" DataSource="string" DataSourceID="string" DisappearAfter="integer" DynamicBottomSeparatorImageUrl="uri" DynamicEnableDefaultPopOutImage="True|False" DynamicHorizontalOffset="integer" DynamicItemFormatString="string" DynamicPopOutImageTextFormatString="string" DynamicPopOutImageUrl="uri" DynamicTopSeparatorImageUrl="uri" DynamicVerticalOffset="integer" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" ID="string" ItemWrap="True|False" MaximumDynamicDisplayLevels="integer" OnDataBinding="DataBinding event handler" OnDataBound="DataBound event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnMenuItemClick="MenuItemClick event handler" OnMenuItemDataBound="MenuItemDataBound event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" Orientation="Horizontal|Vertical" PathSeparator="string" runat="server" ScrollDownImageUrl="uri" ScrollDownText="string" ScrollUpImageUrl="uri" ScrollUpText="string" SkinID="string" SkipLinkText="string" StaticBottomSeparatorImageUrl="uri" StaticDisplayLevels="integer" StaticEnableDefaultPopOutImage="True|False" StaticItemFormatString="string" StaticPopOutImageTextFormatString="string" StaticPopOutImageUrl="uri" StaticSubMenuIndent="size" StaticTopSeparatorImageUrl="uri" Style="string" TabIndex="integer" Target="string" ToolTip="string" Visible="True|False" Width="size" > <DataBindings> <asp:MenuItemBinding DataMember="string" Depth="integer" Enabled="True|False" EnabledField="string" FormatString="string" ImageUrl="uri" ImageUrlField="string" NavigateUrl="uri" NavigateUrlField="string" PopOutImageUrl="uri" PopOutImageUrlField="string" Selectable="True|False" SelectableField="string" SeparatorImageUrl="uri" SeparatorImageUrlField="string" Target="string" TargetField="string" Text="string" TextField="string" ToolTip="string" ToolTipField="string" Value="string" ValueField="string" /> </DataBindings> <DynamicHoverStyle /> <DynamicItemTemplate> <!-- child controls --> </DynamicItemTemplate> <DynamicMenuItemStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small| Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> <DynamicMenuStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small| Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> <DynamicSelectedStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small| Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> <Items /> <LevelMenuItemStyles> <asp:MenuItemStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid| Double|Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> </LevelMenuItemStyles> <LevelSelectedStyles> <asp:MenuItemStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid| Double|Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> </LevelSelectedStyles> <LevelSubMenuStyles> <asp:SubMenuStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid| Double|Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> </LevelSubMenuStyles> <StaticHoverStyle /> <StaticItemTemplate> <!-- child controls --> </StaticItemTemplate> <StaticMenuItemStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small| X-Small|Small|Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> <StaticMenuStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small| Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> <StaticSelectedStyle BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double| Groove|Ridge|Inset|Outset" BorderWidth="size" CssClass="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small| Medium|Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HorizontalPadding="size" ItemSpacing="size" OnDisposed="Disposed event handler" VerticalPadding="size" Width="size" /> </asp:Menu>`

Displays a menu in an ASP.NET Web page.

- Constructor

  Use this constructor to create and initialize a new instance of the class. To dynamically add a control to a page, create a new object, set its properties, and then add it to the collection of a container control, such as .

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Void ``

  The control overrides the method to reset the property to . This member is primarily used by control developers when deriving a custom control from the class.

  Adds HTML attributes and styles that need to be rendered to the specified object.

  The output stream that renders HTML contents to the client. 2.0.0.0
- Property
  System.Web.UI.ControlCollection To be added.

  The property allows you programmatic access to the instance of the class for the control. You can add controls to the collection, remove controls from the collection, or iterate through the server controls in the collection.

  Gets a that contains the child controls of the control.

  2.0.0.0
- Method
  2.0.0.0
  System.Void

  This member is primarily used by control developers when deriving a custom control from the class.

  This method is called by the ASP.NET infrastructure to notify any controls that use composition-based implementation, including controls that derive from and . to create any child controls they contain in preparation for postback or rendering.

  Creates the child controls of a control.

- Method
  System.Void

  This member is used primarily by control developers when deriving a custom control from the class.

  Use the method to bind data from a data source to the control. This method resolves all data-binding expressions in the active template of the control.

  Binds the data source to the control. This method cannot be inherited.

  2.0.0.0
- Property
  System.ComponentModel.MergableProperty(false)
  System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuBindingsEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.MenuItemBindingCollection To be added.

  The collection contains objects that define the relationship between a data item and the menu item it is binding to. When binding to a data source where each data item contains multiple properties (such as an XML element with several attributes), a menu item displays the value returned by the ToString() method of the data item by default. In the case of an XML element, the menu item displays the element name, which shows the underlying structure of the tree, but is not very useful otherwise. You can bind a menu item to a specific data item property by specifying menu item bindings.

  When defining the relationship between a data item and a menu item, you must specify both the criteria for binding and the property of a data item to bind to. The criteria indicate when a data item should be bound to a menu item. The criteria can be specified with a depth, a data member, or both. The depth specifies the menu level that gets bound. For example, if you specify a depth of 0, all menu items in the tree structure at level 0 are bound using the menu item binding. A data member specifies the type of the data item in the underlying data source, but can represent different information depending on the data source. For example, the data member for an XML element specifies the name of the element.

  If multiple objects are defined that conflict with each other, the control applies the menu item bindings in the following order of precedence:

  The object that defines both a depth and a data member.

  The object that defines only the depth.

  The object that defines only the data member.

  The object that defines neither the depth nor the data member.

  Once the binding criteria are established, you can then bind a property of a object that is able to be bound to an attribute or field of a data item. For example, you can bind the property of a menu item to the text attribute on an XML element by setting the property of a object. You can also bind to a static value. If you set the property of a object, all menu items to which the object is applied share the same static text value. For more information on binding the properties of a object to a value, see .

  Although the collection can be programmatically populated, it is usually set declaratively. To specify the menu item bindings, first nest opening and closing <DataBindings> tags between the opening and closing tags of the control. Next, place <asp:MenuItemBinding> elements between the opening and closing <DataBindings> tags for each menu item binding you want to specify.

  Gets a collection of objects that define the relationship between a data item and the menu item it is binding to.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(500)
  System.Int32 To be added.

  By default, a dynamic menu automatically disappears after a certain duration when the mouse pointer is no longer positioned over the menu. Use the property to specify the duration.

  A dynamic menu disappears immediately if the user clicks outside of the menu.

  You can also specify that a dynamic menu should never automatically disappear by setting this property to -1. In this case, the dynamic menu item will disappear only when the user clicks outside the menu.

  This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview.

  Gets or sets the duration for which a dynamic menu is displayed after the mouse pointer is no longer positioned over the menu.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.Web.UI.Themeable(true)
  System.String To be added.

  Use the property to specify an optional custom image to display at the bottom of each dynamic menu item. This image acts as a separator between menu items and is commonly an image of a line.

  You can also display a separator image at the top of each dynamic menu item by setting the property.

  Gets or sets the URL to an image to display at the bottom of each dynamic menu item to separate it from other menu items.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(true)
  System.Boolean To be added.

  When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu by positioning the mouse pointer over the menu item. There are two ways to display this image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  If the property is set, that image overrides the built-in image.

  If the property is not set and the property is set to false, no image is displayed.

  You can specify alternate text for the image by setting the property. This text is displayed as a ToolTip when the user positions the mouse pointer over the image. This text also provides assistive technology devices with a description of the image that can be used to make the control more accessible.

  Gets or sets a value indicating whether the built-in image that indicates that a dynamic menu item has a submenu is displayed.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(0)
  System.Int32 To be added.

  Use the property to adjust the horizontal position of a dynamic menu relative to its parent menu item. This property affects the position of a dynamic menu differently depending on whether the control is displayed vertically or horizontally (as specified by the property). The following table describes the differences.

  Orientation

  Description

  Horizontal

  By default, a dynamic menu is displayed directly below its parent menu item. Setting this property shifts the dynamic menu position horizontally from this base position.

  Vertical

  By default, a dynamic menu item is displayed next to its parent menu item without any spacing in between. Setting this property controls the horizontal spacing between the dynamic menu and its parent menu item.

  You can set this property to a negative value to shift a dynamic menu in a negative direction. If you are displaying a vertical menu, a negative value causes a dynamic menu and its parent menu item to overlap.

  Gets or sets the number of pixels to shift a dynamic menu horizontally relative to its parent menu item.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.Style To be added.

  Use the property to control the appearance of a dynamic menu item when the mouse pointer is positioned over it. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, DynamicHoverStyle-ForeColor). The properties can also be set programmatically in the form (for example, DynamicHoverStyle.ForeColor).

  Style properties for a dynamic menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of a dynamic menu item when the mouse pointer is positioned over it.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  This property can be used to insert text to format dynamic menu items in a menu displayed on mobile devices. The control supports templates for the display of static and dynamic menu items. For mobile devices, templates are ignored, so this property allows you to add characters or text to apply formatting to menu items without using a template.

  To achieve consistent formatting when you use this property, you should also set the property if you want the formatting to be identical between the static and dynamic menu items.

  If both template formatting and this property are applied, the template formatting is ignored for mobile devices.

  Gets or sets additional text shown with all menu items that are dynamically displayed.

  2.0.0.0
- Property
  System.ComponentModel.Browsable(false)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.MenuItemTemplateContainer), System.ComponentModel.BindingDirection.OneWay)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.ITemplate To be added.

  Instead of using the built-in rendering for a dynamic menu, you can define your own look and feel for a dynamic menu item by using the property. To specify a custom template for a dynamic menu item, first place <DynamicItemTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <DynamicItemTemplate> tags. You can further control the style of a dynamic menu by using the property.

  Gets or sets the template that contains the custom content to render for a dynamic menu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.MenuItemStyle To be added.

  Use the property to control the appearance of the menu items within a dynamic menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, DynamicMenuItemStyle-ForeColor). The properties can also be set programmatically in the form (for example, DynamicMenuItemStyle.ForeColor).

  Style properties for a dynamic menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of the menu items within a dynamic menu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.SubMenuStyle To be added.

  Use the property to control the appearance of a dynamic menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, DynamicMenuStyle-ForeColor). The properties can also be set programmatically in the form (for example, DynamicMenuStyle.ForeColor).

  Style properties for a dynamic menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of a dynamic menu.

  2.0.0.0
- Property
  System.String To be added.

  When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu. Use the property to specify the alternate text for this image. The text that you specify provides assistive technology devices with a description of the image that can be used to make the control more accessible.

  There are two ways to display the image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  This property applies to both the built-in image and the custom image.

  Gets or sets the alternate text for the image used to indicate that a dynamic menu item has a submenu.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  When a dynamic menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu by positioning the mouse pointer over the menu item. There are two ways to display this image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  If the property is set, that image overrides the built-in image.

  If the property is not set and the property is set to false, no image is displayed.

  When you set this property, use a slash mark (/) instead of a backslash (\). If you use backslashes in the path, the specified image will not be displayed.

  You can specify alternate text for the image by setting the property.

  Gets or sets the URL to a custom image that is displayed in a dynamic menu item when the dynamic menu item has a submenu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.MenuItemStyle To be added.

  Use the property to control the appearance of a dynamic menu item when the user selects it from the menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, DynamicSelectedStyle-ForeColor). The properties can also be set programmatically in the form (for example, DynamicSelectedStyle.ForeColor).

  Style properties for a dynamic menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of the dynamic menu item selected by the user.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  Use the property to specify an optional custom image to display at the top of each dynamic menu item. This image acts as a separator between menu items and is commonly an image of a line.

  You can also display a separator image at the bottom of each dynamic menu item by setting the property.

  Gets or sets the URL to an image to display at the top of each dynamic menu item to separate it from other menu items.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(0)
  System.Int32 To be added.

  Use the property to adjust the vertical position of a dynamic menu relative to its parent menu item. This property affects the position of a dynamic menu differently depending on whether the control is displayed vertically or horizontally (as specified by the property). The following table describes the differences.

  Orientation

  Description

  Horizontal

  By default, a dynamic menu is displayed directly below its parent menu item without any spacing in between. Setting this property controls the vertical spacing between the dynamic menu and its parent menu item.

  Vertical

  By default, a dynamic menu item is displayed next to its parent menu item with the top edges aligned. Setting this property shifts the dynamic menu position vertically from this base position.

  You can set this property to a negative value to shift a dynamic menu in a negative direction. If you are displaying a horizontal menu, a negative value causes a dynamic menu and its parent menu item to overlap.

  Gets or sets the number of pixels to shift a dynamic menu vertically relative to its parent menu item.

  2.0.0.0
- Method
  System.Void

  This method is used primarily by control developers to extend the control.

  Verifies that the menu control requires data binding and that a valid data source control is specified before calling the method.

  2.0.0.0
- Method
  System.Web.UI.WebControls.MenuItem ``

  Use the method to retrieve a object from the control. To retrieve the object, you must specify a menu path to the menu item. The menu path is a string of delimited values that form the path from a root menu item to the current menu item. To determine the delimiter character, use the property.

  Retrieves the menu item at the specified value path.

  A that represents the menu item at the specified value path.

  The value path to the menu item to retrieve. 2.0.0.0
- Method
  System.Collections.IDictionary

  The method is a helper method used to get the current design-time state of the control.

  Retrieves the design-time state of the control.

  An containing the design-time state of the control.

  2.0.0.0
- Property
  System.ComponentModel.MergableProperty(false)
  System.ComponentModel.Editor("System.Web.UI.Design.MenuItemCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.MenuItemCollection To be added.

  Use the property (collection) to get a object that contains all the menu items in a control. This collection is commonly used to quickly iterate through all the menu items, or to access a specific menu item.

  The collection can also be used to programmatically manage the menu items. You can add, insert, remove, and retrieve collection objects. Any updates to the collection will automatically be reflected in the control after the next round trip to the server.

  Gets a object that contains all menu items in the control.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(false)
  System.Boolean To be added.

  Use the property to specify whether the text displayed in each menu item wraps. When the text runs out of space, it is automatically split and continued on the following line.

  Gets or sets a value indicating whether the text for menu items should wrap.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.MenuItemStyleCollection To be added.

  Use the collection as an alternative to the individual style properties (such as ) to control the style of menu items at the individual levels of the menu. The styles contained in this collection are applied to the menu items based on their menu level. The first style in the collection corresponds to the style of menu items in the first level of the menu. The second style in the collection corresponds to the style of menu items in the second level of the menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.

  If a style is defined for a certain level using the collection, this overrides any menu item style settings for the menu items at that level.

  Gets a object that contains the style settings that are applied to menu items based on their level in a control.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.WebControls.MenuItemStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.MenuItemStyleCollection To be added.

  Use the collection as an alternative to the and properties to control the style of a selected menu item at the individual levels of the menu. The styles contained in this collection are applied to a selected menu item based on its menu level. The first style in the collection corresponds to the style of a selected menu item in the first level of the menu. The second style in the collection corresponds to the style of a selected menu item in the second level of the menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.

  If a style is defined for a certain level using the collection, this overrides the and properties at that level.

  Gets a object that contains the style settings that are applied to the selected menu item based on its level in a control.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.WebControls.SubMenuStyleCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.SubMenuStyleCollection To be added.

  Use the collection as an alternative to the individual style properties (such as ) to control the style of the static submenu items displayed in the static menu at the individual levels. The styles contained in this collection are applied to the static submenu items based on their menu level. The first style in the collection corresponds to the style of the first static submenu level displayed in the static menu. The second style in the collection corresponds to the style of the second submenu level displayed in the static menu, and so on. This collection is most often used to generate table of contents-style navigation menus where menu items at a certain level should have the same appearance, regardless of whether they have submenus.

  If a style is defined for a certain level using the collection, this overrides any static submenu item style settings at that level.

  Gets a object that contains the style settings that are applied to the submenu items in the static menu based on their level in a control.

  2.0.0.0
- Method
  2.0.0.0
  System.Void `` To be added.

  This method is used primarily by control developers to extend the control.

  Loads the state of the properties in the control that need to be persisted.

- Method
  System.Void `` To be added. To be added.

  Loads the previously saved view state of the control.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(3)
  System.Web.UI.Themeable(true)
  System.Int32 To be added.

  You can display multiple menu levels in the static menu by setting the property to a value greater than 1. You can also display additional levels in dynamic menus by setting this property to a value greater than 0. For example, if you display two menu levels in the static menu (by setting the property to 2) and then set this property to 3, three additional menu levels are displayed in dynamic menus. All remaining higher menu levels (if any) are discarded.

  Setting this property to 0 displays a flat menu up to the level specified by the property, without any dynamic menus.

  Gets or sets the number of menu levels to render for a dynamic menu.

  2.0.0.0
- Event
  System.Web.UI.WebControls.MenuEventHandler

  The event is raised when a menu item is clicked in a control. This allows you to provide an event handler that performs a custom routine, such as synchronizing with another control on the page, whenever this event occurs.

  A object is passed to the event handler, which allows you to access the properties of the menu item that raised the event.

  For more information about handling events, see Consuming Events.

  Occurs when a menu item in a control is clicked.

  2.0.0.0
- Field
  System.String

  This read-only field contains the name of the command used to access menu items. The default value is "Click".

  Contains the command name.

  2.0.0.0
- Event
  System.Web.UI.WebControls.MenuEventHandler

  The event is raised when a menu item is bound to data in a control. This allows you to provide an event handler that performs a custom routine, such as adding custom content or modifying a menu item before it is rendered, whenever this event occurs.

  A object is passed to the event handler, which allows you to access the properties of the menu item that raised the event.

  For more information about handling events, see Consuming Events.

  Occurs when a menu item in a control is bound to data.

  2.0.0.0
- Method
  System.Boolean `` `` To be added.

  This member overrides .

  This method is used primarily by control developers to extend the control.

  Determines whether the event for the control is passed up the page's user interface (UI) server control hierarchy.

  true if the event has been canceled; otherwise, false. The default is false.

  The source of the event. 2.0.0.0
- Method
  System.Void ``

  The event is raised when data is bound to the control. This method notifies the control to perform any data-binding logic that is associated with it.

  The method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  This method is generally used by control developers when extending the class.

  Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates.

  Raises the event.

  A that contains the event data. 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  When notified by this method, Web server controls must perform any initialization steps that are required to create and set up an instance. In this stage of the server control's life cycle, the control's view state has yet to be populated. Additionally, you cannot access another server control when this method is called, regardless of whether it is a child or parent to this control. Other server controls are not guaranteed to be created and ready for access.

  Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event.

  A that contains the event data.
- Method
  System.Void ``

  The method is called by the control to raise the event. It is generally used by control developers when extending the class.

  Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event.

  A that contains the event data. 2.0.0.0
- Method
  System.Void ``

  The method is called by the control to raise the event. It is generally used by control developers when extending the class.

  Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event.

  A that contains the event data. 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method is called by the control to raise the event. It is generally used by control developers when extending the class.

  Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event.

  An that contains the event data.
- Property
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.Orientation.Vertical)
  System.Web.UI.WebControls.Orientation To be added.

  Use the property to specify the direction in which to render the control. The following table lists the available directions.

  Orientation

  Description

  Orientation.Horizontal

  The control is rendered horizontally.

  Orientation.Vertical

  The control is rendered vertically.

  Gets or sets the direction in which to render the control.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(/)
  System.Char To be added.

  Each menu item (represented by a object) in the control has a property that specifies the position of the menu item. The value path is a string of delimited values that form the path from a root menu item to the current menu item. Use the property to specify the delimiting character used to separate the values in the menu path. This value is commonly used when parsing the list for the individual values.

  Depending on the text displayed in the control, the delimiter character might need to be changed to prevent any conflicts. For example, if you set the delimiter character to a comma, the displayed text should not contain any commas; otherwise, the property cannot be parsed accurately.

  Gets or sets the character used to delimit the path of a menu item in a control.

  2.0.0.0
- Method
  2.0.0.0
  System.Void

  The method is a helper method called by the control to bind the items in the data source to the control.

  Binds the items from the data source to the menu items in the control.

- Method
  2.0.0.0
  System.Void `` To be added.

  Processes an event raised when a form is posted to the server.

  A that represents the event argument passed to the event handler.
- Method
  2.0.0.0
  System.Void `` To be added.

  Renders the menu control on the client browser.

  The that represents the output stream used to write content to a Web page.
- 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.

  Override when you want to implement custom behavior, for example to write multiple tags to the response stream before any control content, such as <table><tr><td>. This method overrides the method to add the property.

  This method is used primarily by control developers to extend the control.

  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 containing methods to build and render the device-specific output. 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  Override the method to render the contents of the control between the begin and end tags. The default implementation of this method renders any child controls.

  This member overrides .

  The containing methods to build and render the device-specific output.
- Method
  System.Void ``

  This method overrides to render submenus and the property.

  This method is used primarily by control developers to extend the control.

  Performs final markup and writes the HTML closing tag of the control to the output stream emitted to the browser or device.

  The containing methods to build and render the device-specific output. 2.0.0.0
- Method
  2.0.0.0
  System.Object

  This method is used to save the state of the properties in the control that need to be persisted, even when the property is set to false. The method is concerned with state data that is essential for a control's operation (such as an index or keyword) and is separate from the control's view-state data.

  This method is used primarily by control developers to extend the control.

  Saves the state of the properties in the control that need to be persisted.

  An object that contains the state data for the control. If there have been no changes to the state, this method returns null.

- Method
  System.Object To be added.

  Saves the state of the control.

  An that contains the state of the control.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  This property is not supported in the .NET 4.0 rendering mode. If this property is required, you can set the menu to the .NET 3.5 rendering mode by adding the following in the page's code:

  `menuInstance.RenderingCompatibility = new Version(3, 5);`

  Use the property to specify a custom image to display at the bottom of each dynamic menu to indicate that the user can scroll down for additional menu items.

  If this property is not set, the internal, default image is used.

  You can specify alternate text for the image by setting the property.

  Gets or sets the URL to an image displayed in a dynamic menu to indicate that the user can scroll down for additional menu items.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  This property is not supported in the .NET 4.0 rendering mode. If this property is required, you can set the menu to the .NET 3.5 rendering mode by adding the following in the page's code:

  `menuInstance.RenderingCompatibility = new Version(3, 5);`

  When a dynamic menu item contains additional items at the bottom of the menu, an image is displayed to indicate that the user can scroll down to view additional menu items. Use the property to specify the alternate text for this image. The text that you specify provides assistive technology devices with a description of the image that can be used to make the control more accessible.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the alternate text for the image specified in the property.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  This property is not supported in the .NET 4.0 rendering mode. If this property is required, you can set the menu to the .NET 3.5 rendering mode by adding the following in the page's code:

  `menuInstance.RenderingCompatibility = new Version(3, 5);`

  Use the property to specify a custom image to display at the top of each dynamic menu to indicate that the user can scroll up for additional menu items.

  If this property is not set, the internal, default image is used.

  You can specify alternate text for the image by setting the property.

  Gets or sets the URL to an image displayed in a dynamic menu to indicate that the user can scroll up for additional menu items.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  This property is not supported in the .NET 4.0 rendering mode. If this property is required, you can set the menu to the .NET 3.5 rendering mode by adding the following in the page's code:

  `menuInstance.RenderingCompatibility = new Version(3, 5);`

  When a dynamic menu item contains additional items at the top of the menu, an image is displayed to indicate that the user can scroll up to view additional menu items. Use the property to specify the alternate text for this image. The text that you specify provides assistive technology devices with a description of the image that can be used to make the control more accessible.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the alternate text for the image specified in the property.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
  System.Web.UI.WebControls.MenuItem To be added.

  Use the property to determine the menu item selected by the user.

  As a shortcut, you can also determine the text of the selected menu item directly by using the property.

  When the user selects a menu item from a control, the event is raised, which allows you to perform a custom routine by providing an event handler.

  Gets the selected menu item.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.DefaultValue("")
  System.ComponentModel.Browsable(false)
  System.String To be added.

  Use the property as a shortcut to determine the text of the selected menu item. To access the other properties of the selected menu item, use the property.

  Gets the value of the selected menu item.

  2.0.0.0
- Method
  System.Void ``

  This method overrides .

  This method is used primarily by control developers to extend the control.

  Sets design-time data for the control.

  An that contains state data for displaying the control. 2.0.0.0
- Method
  System.Void `` ``

  The method is a helper method used by derived classes to set the property of the specified object.

  Sets the property of the specified object with the specified value.

  The to set. true to set the node as data-bound; otherwise, false. 2.0.0.0
- Method
  System.Void `` ``

  The method is a helper method used by derived classes to set the property of the specified object.

  Sets the property of the specified object with the specified value.

  The to set. The data item for the . 2.0.0.0
- Method
  System.Void `` ``

  The method is a helper method used by derived classes to set the property of the specified object.

  Sets the property of the specified object with the specified value.

  The to set. The data path for the . 2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  Use the property to specify the alternate text for a hidden image read by screen readers to provide the ability to skip the list of links. The text that you specify provides assistive technology devices with a description of the hidden skip link image that can be used to make the control more accessible.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  The control provides the property as a way for the entire control to be skipped by screen readers. If the property is set, an invisible image with alternate text is rendered, giving the user the option to jump to the end of the control. Screen readers read the alternate text aloud, and the image occupies only one pixel space. For pixel-precise control over the rendering of the page, set the property to an empty string ("") and provide your own mechanism to skip the menu. The property is set to the empty string by default.

  Gets or sets the alternate text for a hidden image read by screen readers to provide the ability to skip the list of links.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  Use the property to specify a custom image to display at the bottom of each static menu item that acts as a separator between menu items.

  As an alternative, you can also display a separator image at the top of each static menu item by setting the property.

  Gets or sets the URL to an image displayed as the separator at the bottom of each static menu item.

  2.0.0.0
- Property
  System.Web.UI.Themeable(true)
  System.ComponentModel.DefaultValue(1)
  System.Int32 To be added.

  Use the property to specify the number of menu levels to display in a static menu. All menu levels below the specified value are displayed in a dynamic menu. You can also limit the number of menu levels to display in a dynamic menu by setting the property.

  Gets or sets the number of menu levels to display in a static menu.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(true)
  System.Boolean To be added.

  When a static menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu. There are two ways to display this image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  If the property is set, that image overrides the built-in image, regardless of the value of the property.

  If the property is not set and the property is set to false, no image is displayed.

  You can specify alternate text for the image by setting the property.

  Gets or sets a value indicating whether the built-in image is displayed to indicate that a static menu item has a submenu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.Style To be added.

  Use the property to control the appearance of a static menu item when the mouse pointer is positioned over it. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, StaticHoverStyle-ForeColor). The properties can also be set programmatically in the form (for example, StaticHoverStyle.ForeColor).

  Style properties for a static menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of a static menu item when the mouse pointer is positioned over it.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  This property can be used to insert text to format static menu items in a menu. This is particularly useful for mobile devices. The control supports templates for the display of static and dynamic menu items, but templates are ignored on mobile devices. This property allows you to add characters or text and to apply formatting to menu items for both mobile and desktop devices without using a template.

  To achieve consistent formatting when you use this property, you should also set the property if you want the formatting to be identical between the static and dynamic menu items.

  If both template formatting and this property are applied, the template formatting is ignored for mobile devices.

  Gets or sets additional text shown with all menu items that are statically displayed.

  2.0.0.0
- Property
  System.ComponentModel.Browsable(false)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.MenuItemTemplateContainer), System.ComponentModel.BindingDirection.OneWay)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.ITemplate To be added.

  Instead of using the built-in rendering for a static menu, you can define your own user interface (UI) for a static menu item by using the property. To specify a custom template for a static menu item, first place <StaticTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <StaticTemplate> tags. You can further control the style of a static menu by using the property.

  Gets or sets the template that contains the custom content to render for a static menu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.MenuItemStyle To be added.

  Use the property to control the appearance of the menu items in a static menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, StaticMenuItemStyle-ForeColor). The properties can also be set programmatically in the form (for example, StaticMenuItemStyle.ForeColor).

  Style properties for a static menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of the menu items in a static menu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.SubMenuStyle To be added.

  Use the property to control the appearance of a static menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, StaticMenuStyle-ForeColor). The properties can also be set programmatically in the form (for example, StaticMenuStyle.ForeColor).

  Style properties for a static menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of a static menu.

  2.0.0.0
- Property
  System.String To be added.

  When a static menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu. Use the property to specify the alternate text for this image.

  There are two ways to display the image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  This property applies to both the built-in image and the custom image.

  Gets or sets the alternate text for the pop-out image used to indicate that a static menu item has a submenu.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  When a static menu item contains a submenu, an image can be displayed to indicate that the user can expand the menu. There are two ways to display this image:

  Set the property to true to use the built-in image (default).

  Set the property to specify a custom image.

  If the property is set, that image overrides the built-in image, regardless of the value of the property.

  If the property is not set and the property is set to false, no image is displayed.

  When you set this property, use a slash mark (/) instead of a backslash (\). If you use backslashes in the path, the specified image will not be displayed.

  You can specify alternate text for the image by setting the property.

  Gets or sets the URL to an image displayed to indicate that a static menu item has a submenu.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.NotifyParentProperty(true)
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.WebControls.MenuItemStyle To be added.

  Use the property to control the appearance of the menu item selected by the user in a static menu. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where is a property of the object (for example, StaticSelectedStyle-ForeColor). The properties can also be set programmatically in the form (for example, StaticSelectedStyle.ForeColor).

  Style properties for a static menu item are applied in the following order:

  .

  . If the collection or collection is defined, it is applied at this time, overriding the other menu item style properties.

  . If the collection is defined, it is applied at this time, overriding the other menu item style properties.

  .

  Gets a reference to the object that allows you to set the appearance of the menu item selected by the user in a static menu.

  2.0.0.0
- Property
  System.Web.UI.Themeable(true)
  System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "16px")
  System.Web.UI.WebControls.Unit To be added.

  When the static menu displays more than one menu level (if the property is set to a value higher than 1), use the property to specify the number of pixels by which to indent the submenu items within the static menu.

  Gets or sets the amount of space, in pixels, to indent submenus within a static menu.

  2.0.0.0
- Property
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.Web.UI.UrlProperty
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  Use the property to specify a custom image to display at the top of each static menu item that acts as a separator between menu items.

  As an alternative, you can also display a separator image at the bottom of each static menu item by setting the property.

  Gets or sets the URL to an image displayed as the separator at the top of each static menu item.

  2.0.0.0
- Method
  2.0.0.0
  System.Void `` To be added.

  Processes an event raised when a form is posted to the server.

  A that represents the event argument passed to the event handler.
- Property
  System.Web.UI.HtmlTextWriterTag To be added.

  Use the property to determine the value that is associated with a control. This property is used primarily by control developers.

  Gets the value that corresponds to a control. This property is used primarily by control developers.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  Use the property to specify the window or frame in which to display the Web content linked to a menu item when that menu item is clicked. Values must begin with a letter in the range of A through Z (case-insensitive), except for certain special values that begin with an underscore, as shown in the following table.

  Target value

  Description

  _blank

  Renders the content in a new window without frames.

  _parent

  Renders the content in the immediate frameset parent.

  _search

  Renders the content in the search pane.

  _self

  Renders the content in the frame with focus.

  _top

  Renders the content in the full window without frames.

  Check your browser documentation to determine if the _search value is supported. For example, Internet Explorer versions 5.0 and above support the _search target value

  This property applies to all menu items in a control. You can selectively override this property by setting the property of each object directly.

  The property renders as a target attribute. The target attribute on anchor elements is not allowed in the XHTML 1.1 strict document type definition. If rendered output must conform to XHTML or accessibility standards, do not set the property. For more information, see ASP.NET and XHTML Compliance and Accessibility in Visual Studio 2010 and ASP.NET 4.

  Gets or sets the target window or frame in which to display the Web page content associated with a menu item.

  2.0.0.0
- Method
  System.Void To be added.

  Tracks view-state changes to the control so they can be stored in the control's object. This object is accessible through the property.

  2.0.0.0