System.Web.Configuration.CustomErrorCollection.Add Method

Adds a System.Web.Configuration.CustomError object to the collection.

Syntax

public void Add (CustomError customError)

Parameters

customError
The System.Web.Configuration.CustomError object to add already exists in the collection or the collection is read only.

Remarks

Before adding a custom error to the collection, you must create a System.Web.Configuration.CustomError error object and initialize the CustomError.Redirect and CustomError.StatusCode properties.

Requirements

Namespace: System.Web.Configuration
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0