ProfileSection.AutomaticSaveEnabled 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ść, która określa, czy zmiany informacji o profilu użytkownika są automatycznie zapisywane podczas zamykania strony.
public:
property bool AutomaticSaveEnabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)]
public bool AutomaticSaveEnabled { get; set; }
[<System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)>]
member this.AutomaticSaveEnabled : bool with get, set
Public Property AutomaticSaveEnabled As Boolean
Wartość nieruchomości
true jeśli informacje o profilu są automatycznie zapisywane podczas zamykania strony; w przeciwnym razie , false. Wartość domyślna to true.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać AutomaticSaveEnabled właściwości . Ten przykład kodu jest częścią większego przykładu udostępnionego ProfileSection dla klasy .
// Get the current AutomaticSaveEnabled property value.
Console.WriteLine(
"Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled);
// Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false;
' Get the current AutomaticSaveEnabled property value.
Console.WriteLine( _
"Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled)
' Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false
Uwagi
AutomaticSaveEnabled Gdy właściwość ma falsewartość , zmiany w poszczególnych profilach nie są zapisywane, chyba że Save metoda ProfileCommon klasy jest wywoływana w kodzie.
AutomaticSaveEnabled Gdy właściwość ma truewartość , ProfileAutoSaving zdarzenie umożliwia również kodowi zastąpienie automatycznego zachowania zapisywania.