Modifica

Condividi tramite


_XDocument3.IsDirty Property

Definition

Gets a value that indicates whether the data in a Microsoft Office InfoPath form has been modified since it was last saved.

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

Property Value

true if the data in the form has been modified since it was last saved; otherwise false.

Implements

Examples

In the following example, the IsDirty property of the XDocument object is used to determine whether data in the form has been changed:

if (thisXDocument.<span class="label">IsDirty</span>)
{
 thisXDocument.UI.Alert("Data has been changed.");
}
else
{
 thisXDocument.UI.Alert("Data has not been changed.");
}

In the following example, the IsDirty property of the XDocument object is used to determine whether data in the form has been changed:

if (thisXDocument.<span class="label">IsDirty</span>)
{
 thisXDocument.UI.Alert("Data has been changed.");
}
else
{
 thisXDocument.UI.Alert("Data has not been changed.");
}

Remarks

If the IsDirty property is true, data in the form's underlying XML document has been changed since it was last saved. If false, no changes have occurred.

Note: Changes that occur during an OnLoad event will not result in the IsDirty property being set to true.

Applies to