System.Web
2.0.0.0
System.Configuration.ConfigurationElementCollection
System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.CustomError), AddItemName="error", CollectionType=System.Configuration.ConfigurationElementCollectionType.BasicMap)
The type allows access to the error elements of the customErrors section element collection.
It belongs to a group that includes the , , and .
Represents a collection of objects. This class cannot be inherited.
Constructor
The constructor is not intended to be used directly from your code. It is called by the ASP.NET configuration system. You obtain an instance of the class by using the property.
Initializes a new instance of the class.
2.0.0.0
Method
System.Void
Before adding a custom error to the collection, you must create a error object and initialize the and properties.
Adds a object to the collection.
The object to add already exists in the collection or the collection is read only.
2.0.0.0
Property
System.String[]
To be added.
To be added.
Returns an array of the keys for all of the configuration elements contained in this .
2.0.0.0
Method
System.Void
The result of updating the configuration file after calling the method is dependent upon the chosen. To update the configuration file, you use one of these two overloads: and .
Calling is equivalent to calling .
If you use the .method, the following conditions apply.
-
If you pass a or parameter value, then a clear element is inserted into the clientTarget section of the configuration file at the current hierarchy level.
-
If you pass the parameter value, a series of remove elements are added to the clientTarget Element (ASP.NET Settings Schema) of the configuration file at the current hierarchy level. Each removes all references to an add element defined in a parent configuration file at a higher level in the hierarchy. When you use , there is one additional property on the collection that affects what gets serialized to the configuration file: , which is false by default. The following conditions apply.
-
If the set to true, clear element is inserted into the clientTarget section of the configuration file at the current hierarchy level. This removes all references to the add elements defined in the parent configuration files at higher levels in the hierarchy.
-
If the flag is set to false, the clear element is removed from the clientTarget section of the configuration file at the current hierarchy level, if it exists.
The method actually deletes the add elements defined in the clientTarget section of the configuration file at the current hierarchy level. It also removes all references to the add elements defined in the parent configuration files at higher levels in the hierarchy.
The add elements are not deleted from the clientTarget section of the parent configuration files.
Removes all objects from the collection.
2.0.0.0
Property
System.Configuration.ConfigurationElementCollectionType
To be added.
To be added.
The type of the .
2.0.0.0
Method
System.Configuration.ConfigurationElement
To be added.
To be added.
To be added.
2.0.0.0
Property
System.String
To be added.
To be added.
To be added.
2.0.0.0
Method
System.Web.Configuration.CustomError
To be added.
Gets the object with the specified index.
The with the specified index.
The collection index of the object.
2.0.0.0
Method
System.Web.Configuration.CustomError
To be added.
Gets the object with the specified status code.
The object with the specified status code.
The HTTP status code associated with the custom error.
2.0.0.0
Method
System.Object
To be added.
To be added.
To be added.
To be added.
2.0.0.0
Method
System.String
To be added.
Gets the key at the specified index.
The key at the specified index.
The collection key's index.
2.0.0.0
Property
System.Web.Configuration.CustomError
To be added.
To be added.
To be added.
To be added.
2.0.0.0
Property
System.Web.Configuration.CustomError
To be added.
To be added.
To be added.
To be added.
2.0.0.0
Property
System.Configuration.ConfigurationPropertyCollection
To be added.
To be added.
To be added.
2.0.0.0
Method
System.Void
The method inserts a remove element into the customErrors section of the configuration file at the current hierarchy level. This removes the reference to the add element defined in the parent configuration files at higher levels in the hierarchy.
The add elements are not deleted from the parent configuration files. The remove element merely deactivates them. However, the method does actually delete them at the current hierarchy level.
Removes a object from the collection.
The HTTP status code associated with the custom error.
2.0.0.0
Method
System.Void
The method inserts a remove element into the customErrors section of the configuration file at the current hierarchy level. This is to remove the reference to the add element defined in the parent configuration files at higher-level in the hierarchy.
Note The add elements are not deleted from the parent configuration files. They are merely deactivated. However, the method does actually delete them at the current hierarchy level.
Removes a object at the specified index location from the collection.
The collection index of the object to remove.
2.0.0.0
Method
System.Void
This specified error replaces the current configuration error element.
Adds the specified to the collection.
The to add to the collection.
2.0.0.0