System.Web
2.0.0.0
System.Web.UI.StateManagedCollection
The class is used to store and manage a collection of objects in the control. The control uses the class as the data type for its property. The property is used to store any menu item bindings defined for the control.
The order in which objects appear in the collection has no effect on how those objects are applied to the menu items in a control.
The class supports several ways to access the items in the collection:
-
Use the indexer to directly retrieve the object at a specific zero-based index.
-
Use the method to create an enumerator that can be used to iterate through the collection.
-
Use the method to copy the contents of the collection into an array.
You can programmatically manage a object by adding and removing objects. To add menu items to the collection, use the or the method. To remove nodes from the collection, use the , the , or the method.
The class contains properties and methods that allow you to retrieve information about the collection itself. To find out how many items are in the collection, use the property. If you want to determine whether the collection contains a certain object, use the method. To get the index of a object in the collection, use the method.
Represents a collection of objects.
Method
System.Int32
Use the method to append the specified object to the end of the collection.
You can add null values and duplicate objects to the collection.
As an alternative, you can insert a object in the collection at a specific index by using the method.
The order in which objects appear in the collection has no effect on how those objects are applied to the menu items in a control.
Appends the specified object to the end of the collection.
The index at which the was inserted in the collection.
The to append to the end of the collection.
2.0.0.0
Method
System.Boolean
Use the method to determine whether a object is contained in the collection. This method is commonly used to test for the existence of a object before performing a task, such as adding or removing a menu item binding from the collection.
Determines whether the specified object is in the collection.
true if the specified is contained in the collection; otherwise, false.
The to find.
2.0.0.0
Method
System.Void
Use the method to copy the contents of the collection into the specified zero-based array. Items are copied starting at the specified index of the target array. With the array, you can then use array syntax to access the items in the object.
As an alternative, you can also use the method to create an enumerator that can be used to access the items in the collection.
Copies all the items from the object to a compatible one-dimensional array of objects, starting at the specified index in the target array.
A zero-based array of objects that receives the copied items from the collection.
The position in the target array at which to start receiving the copied content.
2.0.0.0
Method
System.Object
The method is a helper function that is used to create an of the data type that corresponds to the specified index. The index is often determined by using the method to create an array of supported data types and then searching the array for the desired data type.
The parameter is not used in this implementation of the method and is ignored. You should always pass in null for this parameter. This implementation of the method always returns an empty object.
This method is used only by control developers.
Creates an of the data type that corresponds to the specified index.
Always returns an empty object.
The index of the data type to create. This parameter is not used in this implementation of the method; therefore, you should always pass in null.
2.0.0.0
Method
System.Type[]
The method is a helper function that is used to create an array of data types supported by the class. The array is often searched to determine the index of a desired data type. The index is then passed to the method to create an of the corresponding data type.
This method is used only by control developers.
Creates an array of objects that contains the supported data types of the class.
An array of objects that contains the data types supported by the .
2.0.0.0
Method
System.Int32
To be added.
Use the method to determine the index of the specified object in the collection.
The order in which objects appear in the collection has no effect on how those objects are applied to the menu items in a control.
If the menu item binding is not in the collection, the method returns -1.
If the specified menu item binding appears multiple times in the collection, the index of the first occurrence is returned.
Determines the index of the specified object in the collection.
The zero-based index of the first occurrence of within the collection, if found; otherwise, -1.
2.0.0.0
Method
System.Void
Use the method to insert the specified object in the collection at the specified index.
You can add null values and duplicate objects to the collection.
As an alternative, you can simply append a object to the end of the collection by using the method.
The order in which objects appear in the collection has no effect on the how those objects are applied to the menu items in a control.
Adds the specified object to the collection at the specified index location.
The zero-based index location at which to insert the .
The to insert.
2.0.0.0
Property
System.Web.UI.WebControls.MenuItemBinding
To be added.
To be added.
To be added.
To be added.
2.0.0.0
Method
System.Void
Use the method to remove the specified menu item binding from the collection. All items that follow that menu item are then moved up to fill in the vacant position. The indexes of the moved items are also updated.
The collection can contain null values, as well as duplicate objects.
As an alternative, you can remove a menu item from a specific index in the collection by using the method. You can also remove all menu items from the collection by using the method.
The order in which objects appear in the collection has no effect on how those objects are applied to the menu items in a control.
Removes the specified object from the collection.
The to remove from the collection.
2.0.0.0
Method
System.Void
Use the method to remove the object at the specified index location from the collection. All items that follow that menu item are then moved up to fill in the vacant position. The indexes of the moved items are also updated.
The collection can contain null values, as well as duplicate objects.
As an alternative, you can remove a specific object by using the method. You can also remove all menu items from the collection by using the method.
Removes the object at the specified index location from the collection.
The zero-based index location of the menu item binding to remove.
2.0.0.0
Method
System.Void
The method is a helper function that is used by the class to mark a object as having changed since the last load or save from view state.
This method is used only by control developers.
Marks the specified object as having changed since the last load or save from view state.
The to mark as having changed since the last load or save from view state.
2.0.0.0