ProfileSection.AutomaticSaveEnabled Eigenschaft

Definition

Ruft einen Wert ab, der bestimmt, ob an Benutzerprofilinformationen vorgenommene Änderungen automatisch beim Beenden einer Seite gespeichert werden, oder legt diesen fest.

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

Eigenschaftswert

true, wenn Profilinformationen beim Beenden der Seite automatisch gespeichert werden, andernfalls false. Der Standardwert ist true.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung der AutomaticSaveEnabled-Eigenschaft veranschaulicht. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die ProfileSection-Klasse bereitgestellt wird.


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

Hinweise

Wenn die AutomaticSaveEnabled -Eigenschaft lautet false, werden Änderungen an einzelnen Profilen nur gespeichert, wenn die Save -Methode der ProfileCommon -Klasse im Code aufgerufen wird. Wenn die AutomaticSaveEnabled -Eigenschaft lautet true, ermöglicht das ProfileAutoSaving -Ereignis auch code das Überschreiben des automatischen Speicherverhaltens.

Gilt für:

Weitere Informationen