CustomErrorsSection.Mode Właściwość

Definicja

Pobiera lub ustawia modalność wyświetlania błędu.

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

Wartość właściwości

Jedna z CustomErrorsMode wartości. Wartość domyślna to RemoteOnly.

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano, jak używać Mode właściwości.

Zapoznaj się z przykładem kodu w temacie klasy, CustomErrorsSection aby dowiedzieć się, jak uzyskać sekcję.

// 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

Uwagi

Określa, czy błędy niestandardowe są włączone, wyłączone, czy wyświetlane tylko klientom zdalnym.

Dotyczy