System.Web.UI.WebControls.MenuItemBindingCollection.Insert Method

Adds the specified System.Web.UI.WebControls.MenuItemBinding object to the collection at the specified index location.

Syntax

public void Insert (int index, MenuItemBinding binding)

Parameters

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

Remarks

Use the MenuItemBindingCollection.Insert(int, MenuItemBinding) method to insert the specified System.Web.UI.WebControls.MenuItemBinding object in the collection at the specified index.

Note:

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

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

Note:

The order in which System.Web.UI.WebControls.MenuItemBinding objects appear in the collection has no effect on the how those objects are applied to the menu items in a System.Web.UI.WebControls.Menu control.

Requirements

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