This documentation is archived and is not being maintained.

ProfileBase.IsDirty Property

Gets a value indicating whether any of the profile properties have been modified.

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

public bool IsDirty { get; }
/** @property */
public boolean get_IsDirty ()

public function get IsDirty () : boolean

Not applicable.

Property Value

true if any of the profile properties have been modified; otherwise, false.

The IsDirty property can be used by a profile provider during the Save method to determine whether properties that are made up of primitive types, strings, or DateTime objects have been changed. Changed properties are then updated by the profile provider in the Save method. The Save method is automatically called at the end of page execution if the AutomaticSaveEnabled property is true

A profile provider called in the Save method cannot explicitly determine whether a profile property with a custom class type or a complex type, such as a collection, has changed. You can use the ProfileAutoSaving event to determine whether a custom object has been modified and to continue with the automatic save for modified objects or cancel the automatic save if no objects have been modified. The default behavior of the ProfileBase class is to set the IsDirty property to true for properties that are of a custom or complex type the first time the property is accessed.

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