MenuItem::ChildItems Property
Gets a MenuItemCollection object that contains the submenu items of the current menu item.
Assembly: System.Web (in System.Web.dll)
public: [BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode::InnerDefaultProperty)] property MenuItemCollection^ ChildItems { MenuItemCollection^ get(); }
Property Value
Type: System.Web.UI.WebControls::MenuItemCollection^A MenuItemCollection that contains the submenu items of the current menu item. The default is null, which indicates that this menu item does not contain any submenu items.
Use the 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 ChildItems property of a subsequent menu item. If the ChildItems property is null, the current menu does not have any submenu items.
The 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 MenuItem objects from the collection. Any updates to the collection will automatically be reflected in the Menu control the next time the page is refreshed.
Available since 2.0