CustomError.Redirect Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur URL pengalihan.
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
Nilai Properti
URL tempat aplikasi dialihkan ketika terjadi kesalahan.
- Atribut
Contoh
Contoh kode berikut menunjukkan cara menggunakan URL pengalihan. Lihat contoh kode dalam CustomError topik kelas untuk mempelajari cara mendapatkan koleksi.
// 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"
Keterangan
Properti Redirect mengidentifikasi URL halaman kustom yang terkait dengan kesalahan tertentu.