MenuItemCollection.ItemFromID method

Returns a MenuItem in a collection, and all subcollections with an ID matching the parameter.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function ItemFromID ( _
    menuItemID As String _
) As MenuItem
'Usage
Dim instance As MenuItemCollection
Dim menuItemID As String
Dim returnValue As MenuItem

returnValue = instance.ItemFromID(menuItemID)
public MenuItem ItemFromID(
    string menuItemID
)

Parameters

  • menuItemID
    Type: System.String

    The unique identifier of the menu item.

Return value

Type: Microsoft.SharePoint.WebPartPages.MenuItem
A MenuItem object with the specified ID. Returns a null reference (Nothing in Visual Basic) if a MenuItem does not exist.

See also

Reference

MenuItemCollection class

MenuItemCollection members

Microsoft.SharePoint.WebPartPages namespace