MenuItem::ChildItems Property
Gets a MenuItemCollection object that contains the submenu items of the current menu item.
Assembly: System.Web (in System.Web.dll)
[BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode::InnerDefaultProperty)] public: property MenuItemCollection^ ChildItems { MenuItemCollection^ get (); }
Property Value
Type: System.Web.UI.WebControls::MenuItemCollectionA MenuItemCollection that contains the submenu items of the current menu item. The default is nullptr, 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 nullptr, 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.