System.Web.UI.WebControls.Menu.Items Property

Gets a System.Web.UI.WebControls.MenuItemCollection object that contains all menu items in the System.Web.UI.WebControls.Menu control.

Syntax

[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)]
public MenuItemCollection Items { get; }

Value

Documentation for this section has not yet been entered.

Remarks

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

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

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0