Removes the specified System.Web.UI.WebControls.MenuItemBinding object from the collection.
- binding
- The System.Web.UI.WebControls.MenuItemBinding to remove from the collection.
Use the MenuItemBindingCollection.Remove(MenuItemBinding) method to remove the specified menu item binding from the collection. All items that follow that menu item are then moved up to fill in the vacant position. The indexes of the moved items are also updated.
The collection can contain null values, as well as duplicate System.Web.UI.WebControls.MenuItemBinding objects.
As an alternative, you can remove a menu item from a specific index in the collection by using the MenuItemBindingCollection.RemoveAt(int) method. You can also remove all menu items from the collection by using the System.Web.UI.StateManagedCollection.Clear method.
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.