OutputCacheProfile.Enabled Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia wartość wskazującą, czy buforowanie jest włączone.
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
Wartość nieruchomości
true jeśli buforowanie jest włączone; w przeciwnym razie , false. Wartość domyślna to false.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać Enabled właściwości.
// 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
Uwagi
Właściwość Enabled umożliwia włączanie lub wyłączanie mechanizmu buforowania tylko w jednym miejscu. Ma on wpływ na wszystkie strony lub kontrolki, które używają tego polecenia OutputCacheProfile.