CustomErrorsSection.Errors Property
.NET Framework (current version)
Gets the collection of the CustomError objects.
Assembly: System.Web (in System.Web.dll)
<ConfigurationPropertyAttribute("", IsDefaultCollection := True)> Public ReadOnly Property Errors As CustomErrorCollection
Property Value
Type: System.Web.Configuration.CustomErrorCollectionA CustomErrorCollection that contains the custom errors.
Each error is associated with a custom error condition and specifies a custom error page.
The following code example shows how to use the Errors collection.
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim customErrorsSection _
As CustomErrorsSection = _
CType(configuration.GetSection( _
"system.web/customErrors"), _
CustomErrorsSection)
' Get the collection
Dim customErrorsCollection _
As CustomErrorCollection = customErrorsSection.Errors
.NET Framework
Available since 2.0
Available since 2.0
Show: