ProfileSection.AutomaticSaveEnabled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that determines whether changes to user-profile information are automatically saved on page exit.
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
Property Value
true
if profile information is automatically saved on page exit; otherwise, false
. The default is true
.
- Attributes
Examples
The following code example shows how to use the AutomaticSaveEnabled property. This code example is part of a larger example provided for the ProfileSection class.
// 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
Remarks
When the AutomaticSaveEnabled property is false
, changes to individual profiles are not saved unless the Save method of the ProfileCommon
class is called in code. When the AutomaticSaveEnabled property is true
, the ProfileAutoSaving event also allows code to override the automatic save behavior.