แก้ไข

แชร์ผ่าน


ProfileBase.IsDirty Property

Definition

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

public:
 property bool IsDirty { bool get(); };
public bool IsDirty { get; }
member this.IsDirty : bool
Public ReadOnly Property IsDirty As Boolean

Property Value

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

Remarks

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.

Applies to

See also