語言

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

自訂頁面的網址對應到錯誤代碼。

備註

CustomError 構子並非直接從你的程式碼中使用。 它由 ASP.NET 配置系統稱為此。 你可以透過使用該CustomError方法獲得該GetSection類別的實例。

適用於