CustomError(Int32, String) 构造函数

定义

初始化 CustomError 类的新实例。

public:
 CustomError(int statusCode, System::String ^ redirect);
public CustomError(int statusCode, string redirect);
new System.Web.Configuration.CustomError : int * string -> System.Web.Configuration.CustomError
Public Sub New (statusCode As Integer, redirect As String)

参数

statusCode
Int32

导致重定向到错误页的 HTTP 状态代码。

redirect
String

映射到错误代码的自定义页面的 URL。

注解

构造 CustomError 函数不打算直接从代码使用。 它由 ASP.NET 配置系统调用。 可以使用CustomError该方法获取类的GetSection实例。

适用于