Name Property (ViewInfo Object)

Microsoft Office InfoPath

A read-only property that returns a string value indicating the name of the view that is associated with the ViewInfo object.

expression.Name

expression    Required. An expression that returns a reference to the ViewInfo 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 ViewInfo object is the same as the name of the view that it represents. The name of the ViewInfo object can also be used as the argument to the Item property of the ViewInfos collection.

Example

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

var objViewInfo;

objViewInfo = XDocument.ViewInfos(0);
XDocument.UI.Alert("View name: " + objViewInfo.Name);