Share via


Insert(Int32, Microsoft.SharePoint.WebPartPages.MenuItem) Method

The Insert method of the MenuItemCollection class adds a previously created MenuItem at the specified index within the menu item collection.

Parameters

index   The location in the collection to add the menu item.

value   The MenuItem object to add to the collection.

Example

The following code example creates a custom menu that has one parent menu item and two submenu itmes. It uses the Insert method to add the menu item into a specific place within the custom menu.

Requirements

Platforms: Windows Server 2003

Security: Code Access Security