OutputCacheProfile.Enabled Propriedade

Definição

Recebe ou define um valor que indica se o cache está ativado.

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Valor de Propriedade

true se a cache estiver ativada; caso contrário, false. O valor predefinido é false.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a Enabled propriedade.


 // Get the current Enabled.
Boolean enabledValue = 
    outputCacheProfile.Enabled;

 // Set the Enabled.
 outputCacheProfile.Enabled = 
     false;
    ' Get the current Enabled property.
    Dim enabledValue As [Boolean] = _
    outputCacheProfile.Enabled
  
    ' Set the Enabled property.
outputCacheProfile.Enabled = False

Observações

A Enabled propriedade permite ativar ou desativar o mecanismo de cache num único local. Afeta todas as páginas ou controlos que usam este OutputCacheProfile.

Aplica-se a

Ver também