CustomErrorCollection Class
.NET Framework 2.0
Represents a collection of CustomError objects. This class cannot be inherited.
Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The CustomErrorCollection type allows access to the error elements of the customErrors section element collection.
It belongs to a group that includes the CustomError, CustomErrorsMode, and CustomErrorsSection.
This example demonstrates how to specify values declaratively for the error elements of the customErrors section, which can also be accessed as elements of the CustomErrorCollection collection.
The following configuration file example shows how to specify values declaratively for the error elements.
<customErrors mode="RemoteOnly"
defaultRedirect="customerror.htm">
<error statusCode="404" redirect="customerror404.htm"/>
</customErrors>
The following code example demonstrates how to use the CustomErrorCollection class.
System.Object
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.CustomErrorCollection
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.CustomErrorCollection
Community Additions
ADD
Show: