Determines the index of the specified System.Web.UI.WebControls.MenuItemStyle object in the collection.
- style
The System.Web.UI.WebControls.MenuItemStyle to locate.
![]()
The zero-based index of the first occurrence of the specified System.Web.UI.WebControls.MenuItemStyle, if found; otherwise, -1.
Use the MenuItemStyleCollection.IndexOf(MenuItemStyle) method to determine the zero-based index of the specified System.Web.UI.WebControls.MenuItemStyle object in the collection. If the node is not in the collection, the method returns -1.
If the specified System.Web.UI.WebControls.MenuItemStyle object appears multiple times in the collection, the index of the first occurrence is returned.