MenuItemCollection::Add Method (MenuItem^)
.NET Framework (current version)
Appends the specified MenuItem object to the end of the current MenuItemCollection object.
Assembly: System.Web (in System.Web.dll)
Parameters
- child
-
Type:
System.Web.UI.WebControls::MenuItem^
The MenuItem to append to the end of the current MenuItemCollection.
| Exception | Condition |
|---|---|
| ArgumentNullException | child is null. |
The following code example demonstrates how to use the Add method to programmatically add a MenuItem object to a MenuItemCollection object.
.NET Framework
Available since 2.0
Available since 2.0
Show:
