CustomErrorsSection.Mode CustomErrorsSection.Mode CustomErrorsSection.Mode CustomErrorsSection.Mode Property

Definition

Gets or sets the error display modality.

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

Property Value

Examples

The following code example shows how to use the Mode property.

Refer to the code example in the CustomErrorsSection class topic to learn how to get the section.

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

Remarks

Specifies whether custom errors are enabled, disabled, or shown only to remote clients.

Applies to