Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ProfileManager.AutomaticSaveEnabled Property

Gets a value indicating whether the user profile will be automatically saved at the end of the execution of an ASP.NET page.

Namespace: System.Web.Profile
Assembly: System.Web (in system.web.dll)

public static bool AutomaticSaveEnabled { get; }
/** @property */
public static boolean get_AutomaticSaveEnabled ()

public static function get AutomaticSaveEnabled () : boolean

Not applicable.

Property Value

true if the user profile will be automatically saved at the end of the execution of an ASP.NET page; otherwise, false. The default is true.

Exception typeCondition

HttpException

An attempt was made to get the AutomaticSaveEnabled property value without at least Medium permission.

The AutomaticSaveEnabled property indicates whether automatic saving of the user profile is enabled for the application. If automatic saving is enabled, the ProfileModule object raises the ProfileAutoSaving event and calls the Save method during the EndRequest event at the end of the execution of an ASP.NET page.

The AutomaticSaveEnabled property is set using the automaticSaveEnabled attribute of the profile element in the Web.config file for an ASP.NET application.

The following configuration file excerpt shows the profile element in the system.web section of the Web.config file for an ASP.NET application. It specifies the application's default profile provider to a SqlProfileProvider instance and sets the automaticSaveEnabled attribute to true.

<profile enabled="true"
  automaticSaveEnabled="true"
  defaultProvider="SqlProvider">
  <providers>
    <add name="SqlProvider"
      type="System.Web.Profile.SqlProfileProvider"
      connectionStringName="SqlServices"
      applicationName="MyApplication" />
  </providers>
</profile>

  • AspNetHostingPermission  to get the AutomaticSaveEnabled property value in a hosted environment. Permission value: Medium.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft