System.Web.UI.WebControls.MenuItemBindingCollection.Add Method

Appends the specified System.Web.UI.WebControls.MenuItemBinding object to the end of the collection.

Syntax

public int Add (MenuItemBinding binding)

Parameters

binding
The System.Web.UI.WebControls.MenuItemBinding to append to the end of the collection.

Returns

The index at which the System.Web.UI.WebControls.MenuItemBinding was inserted in the collection.

Remarks

Use the MenuItemBindingCollection.Add(MenuItemBinding) method to append the specified System.Web.UI.WebControls.MenuItemBinding object to the end of the collection.

Note:

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

As an alternative, you can insert a System.Web.UI.WebControls.MenuItemBinding object in the collection at a specific index by using the MenuItemBindingCollection.Insert(int, MenuItemBinding) method.

Note:

The order in which System.Web.UI.WebControls.MenuItemBinding objects appear in the collection has no effect on 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