Export (0) Print
Expand All

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 Value

Type: System.Boolean
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.

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0

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.

© 2014 Microsoft