Searches for an item object specified by the value of its MenuItem.Name property and returns the zero-based index of the first occurrence within the item collection.
public int IndexOfName( string name )
Public Function IndexOfName( name As String ) As Integer
The zero-based index of the first occurrence of the item with the specified name within the item collection, if found; otherwise, the negative one (-1).
The IndexOfName method enables you to determine where an item specified by the MenuItem.Name property value is located within the item collection represented by the current object. The collection of item objects can be accessed via the ASPxMenuBase.Items property of a Menu control.
This method searches the item collection for the specified item and, if found, returns the index value of the first occurrence. If no instance is found, the negative one (-1) is returned. The collection of items is searched forward starting with the first element and ending with the last one.