SubMenuStyleCollection.Insert(Int32, SubMenuStyle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts a SubMenuStyle object into the SubMenuStyleCollection collection at the specified index.
public:
void Insert(int index, System::Web::UI::WebControls::SubMenuStyle ^ style);
public void Insert (int index, System.Web.UI.WebControls.SubMenuStyle style);
member this.Insert : int * System.Web.UI.WebControls.SubMenuStyle -> unit
Public Sub Insert (index As Integer, style As SubMenuStyle)
Parameters
- index
- Int32
The zero-based index at which the SubMenuStyle object should be inserted.
- style
- SubMenuStyle
The SubMenuStyle object to insert into the SubMenuStyleCollection collection.
Exceptions
The specified index
is outside the range of the collection.
The SubMenuStyleCollection collection is read-only.
The specified style
is null
.
Remarks
If index is -1, style
is inserted at the beginning of the SubMenuStyleCollection collection. If index equals the number of items in the collection, style
is appended to the end of the SubMenuStyleCollection collection.
The OnValidate method is called to validate the style parameter before it is added to the collection. The OnInsert method is called before the SubMenuStyle object is inserted into the collection, and the OnInsertComplete method is called after the object is inserted.
Applies to
.NET