System.Web.UI.WebControls.MenuItemCollection.AddAt Method

Inserts the specified System.Web.UI.WebControls.MenuItem object in the current System.Web.UI.WebControls.MenuItemCollection object at the specified index location.

Syntax

public void AddAt (int index, MenuItem child)

Parameters

index
The zero-based index location at which to insert the System.Web.UI.WebControls.MenuItem.
child
The System.Web.UI.WebControls.MenuItem to insert.

Remarks

Use the MenuItemCollection.AddAt(int, MenuItem) method to insert the specified System.Web.UI.WebControls.MenuItem object in the collection at the specified index.

Note:

You can add null values and duplicate System.Web.UI.WebControls.MenuItem objects to the collection.

As an alternative, you can simply append a System.Web.UI.WebControls.MenuItem object to the end of the collection by using the MenuItemCollection.Add(MenuItem) method.

Requirements

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