Bagikan melalui


CustomErrorsSection.Mode Properti

Definisi

Mendapatkan atau mengatur modalitas tampilan kesalahan.

public:
 property System::Web::Configuration::CustomErrorsMode Mode { System::Web::Configuration::CustomErrorsMode get(); void set(System::Web::Configuration::CustomErrorsMode value); };
[System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.CustomErrorsMode.RemoteOnly)]
public System.Web.Configuration.CustomErrorsMode Mode { get; set; }
[<System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.CustomErrorsMode.RemoteOnly)>]
member this.Mode : System.Web.Configuration.CustomErrorsMode with get, set
Public Property Mode As CustomErrorsMode

Nilai Properti

Salah CustomErrorsMode satu nilai. Defaultnya adalah RemoteOnly.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan Mode properti .

Lihat contoh kode dalam CustomErrorsSection topik kelas untuk mempelajari cara mendapatkan bagian .

// Get the current Mode.
CustomErrorsMode currentMode = 
    customErrorsSection.Mode;

// Set the current Mode.
customErrorsSection.Mode = 
    CustomErrorsMode.RemoteOnly;
' Get the current Mode.
  Dim currentMode _
  As CustomErrorsMode = customErrorsSection.Mode

' Set the current Mode.
  customErrorsSection.Mode = _
  CustomErrorsMode.RemoteOnly

Keterangan

Menentukan apakah kesalahan kustom diaktifkan, dinonaktifkan, atau hanya ditampilkan ke klien jarak jauh.

Berlaku untuk