Inserts a System.Web.UI.WebControls.SubMenuStyle object into the System.Web.UI.WebControls.SubMenuStyleCollection collection at the specified index.
- index
- The zero-based index at which the System.Web.UI.WebControls.SubMenuStyle object should be inserted.
- style
- The System.Web.UI.WebControls.SubMenuStyle object to insert into the System.Web.UI.WebControls.SubMenuStyleCollection collection.
If index is -1, style is inserted at the beginning of the System.Web.UI.WebControls.SubMenuStyleCollection collection. If index equals the number of items in the collection, style is appended to the end of the System.Web.UI.WebControls.SubMenuStyleCollection collection.
The System.Web.UI.StateManagedCollection.OnValidate(object) method is called to validate the style parameter before it is added to the collection. The SubMenuStyleCollection.OnInsert(int, object) method is called before the System.Web.UI.WebControls.SubMenuStyle object is inserted into the collection, and the System.Web.UI.StateManagedCollection.OnInsertComplete(int, object) method is called after the object is inserted.