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 CustomErrorCollection Errors { get; }
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. System.Configuration.Configuration configuration = WebConfigurationManager.OpenWebConfiguration( "/aspnetTest"); // Get the section. CustomErrorsSection customErrorsSection = (CustomErrorsSection)configuration.GetSection( "system.web/customErrors"); // Get the collection CustomErrorCollection customErrorsCollection = customErrorsSection.Errors;
.NET Framework
Available since 2.0
Available since 2.0
Show: