ProfileSection.AutomaticSaveEnabled Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un valore che determina se le modifiche apportate alle informazioni sul profilo utente vengono salvate automaticamente all'uscita della pagina.
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
Valore della proprietà
true se le informazioni sul profilo vengono salvate automaticamente all'uscita della pagina; in caso contrario, false. Il valore predefinito è true.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la AutomaticSaveEnabled proprietà . Questo esempio di codice fa parte di un esempio più ampio fornito per la ProfileSection classe .
// 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
Commenti
Quando la AutomaticSaveEnabled proprietà è false, le modifiche ai singoli profili non vengono salvate a meno che il Save metodo della ProfileCommon classe non venga chiamato nel codice. Quando la AutomaticSaveEnabled proprietà è true, l'evento consente anche al codice di eseguire l'override ProfileAutoSaving del comportamento di salvataggio automatico.