Share via


DataDOMEvent.OldValue property

Gets the original value of an XML Document Object Model (DOM) node that is being updated or deleted during a data validation event.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property OldValue As Object
    Get
'Usage
Dim instance As DataDOMEvent
Dim value As Object

value = instance.OldValue
Object OldValue { get; }

Property value

Type: System.Object

Remarks

The OldValue property contains the original value of the XML DOM node that will be replaced with a new value or deleted. To get the new value of the XML DOM node, use the NewValue property.

Examples

In the following example, the OldValue property of the DataDOMEventObject object is used to display the original value of an XML DOM node, along with its NewValue:

thisXDocument.UI.Alert("Original value: " + e.OldValue.ToString() + "\nNew value: " + e.NewValue.ToString());

See also

Reference

DataDOMEvent interface

DataDOMEvent members

Microsoft.Office.Interop.InfoPath namespace