Show All

# Name Property (DataObject Object)

A read-only property that returns a string value indicating the name of the associated DataObject object.

expression.Name

expression Required. An expression that returns a reference to the DataObject object.

## Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

## Remarks

The name of the DataObject object is the same as the name of the secondary data source that it represents. The name of the DataObject object can also be used as the argument to the Item property of the DataObjects collection.

## Example

In the following example, the Name property of the DataObject object is used to to display the name of the DataObject object in a message box:

    var objDataObject;

    objDataObject = XDocument.DataObjects(0);
    XDocument.UI.Alert("DataObject name: " + objDataObject.Name);

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp