Поделиться через


CustomError.Redirect Свойство

Определение

Возвращает или задает URL-адрес перенаправления.

public:
 property System::String ^ Redirect { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("redirect", IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Redirect { get; set; }
[<System.Configuration.ConfigurationProperty("redirect", IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Redirect : string with get, set
Public Property Redirect As String

Значение свойства

URL-адрес, в который приложение перенаправляется при возникновении ошибки.

Атрибуты

Примеры

В следующем примере кода показано, как использовать URL-адрес перенаправления. Ознакомьтесь с примером CustomError кода в разделе класса, чтобы узнать, как получить коллекцию.

// Get first errorr Redirect.
CustomError currentError0 =
    customErrorsCollection[0];
string currentRedirect =
    currentError0.Redirect;

// Set first error Redirect.
currentError0.Redirect =
    "customError404.htm";
' Get first errorr Redirect.
  Dim currentError0 As CustomError = _
  customErrorsCollection(0)
  Dim currentRedirect As String = _
  currentError0.Redirect

' Set first error Redirect.
currentError0.Redirect = "customError404.htm"

Комментарии

Свойство Redirect определяет URL-адрес настраиваемой страницы, связанной с определенной ошибкой.

Применяется к