Occurs at the end of page execution if automatic profile saving is enabled.
Assembly: System.Web (in System.Web.dll)
The event is raised at the end of page execution if the ProfileManager.AutomaticSaveEnabled property is true. You can access the event of the ProfileModule class in the Global.asax file for your ASP.NET application using the Profile_ProfileAutoSaving global event, as shown in the example for this topic.
The SettingsBase.Save method checks the IsDirty property value for each SettingsPropertyValue in the user profile to determine whether properties that are made up of primitive types, strings, or DateTime objects have been changed. The Save method cannot explicitly determine whether a custom class has changed. You can use the event to determine whether a custom object has been changed and then either to continue with the automatic save for modified objects or to cancel the automatic save if no objects have been modified.
There may be multiple subscribers to the event. The ProfileModule will use the last value that the ContinueWithProfileAutoSave property is set to. As a result, it is recommended that you explicitly set the ContinueWithProfileAutoSave property in the event whether you are canceling or continuing with the automatic save, as you may need to overwrite the value set by an earlier subscriber.
The following code example shows the event included in the Global.asax file for an ASP.NET application.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.