System.Web.UI.WebControls.MenuItem.ChildItems Property

Gets a System.Web.UI.WebControls.MenuItemCollection object that contains the submenu items of the current menu item.

Syntax

[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.MergableProperty(false)]
public MenuItemCollection ChildItems { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the MenuItem.ChildItems property (collection) to access the submenu items of the current menu item, if any. This collection contains only the menu items at the next level. To access menu items further down the menu tree, use the MenuItem.ChildItems property of a subsequent menu item. If the MenuItem.ChildItems property is null, the current menu does not have any submenu items.

The MenuItem.ChildItems property can also be used to programmatically manage the submenu items of the current menu item. You can add, insert, remove, retrieve, and modify System.Web.UI.WebControls.MenuItem objects from the collection. Any updates to the collection will automatically be reflected in the System.Web.UI.WebControls.Menu control the next time the page is refreshed.

Requirements

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