Export (0) Print
Expand All

XmlForm.Uri property

Gets the Uniform Resource Identifier (URI) of a form.

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

public abstract string Uri { get; }

Property value

Type: System.String
The Uniform Resource Identifier (URI) of the form.

The value returned by the Uri property can be passed as the name of a form when it is accessed from the XmlFormCollection collection.

Depending on the state of the form, the Uri property will return a different value as described in the following table.

Previewing a form

(Preview) formname

New form

formname

Previously saved form

The full URL of the form, which can be a path name (C:\My Documents\MyForm.xml) or a valid URL if the form template was published to SharePoint, a Web server, or Microsoft SharePoint Server 2010 with InfoPath Forms Services.

This member 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.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

In the following code example, the Uri property of the XmlForm class is used to display a form's URI in a message box.

MessageBox.Show(this.Uri);

Community Additions

Show:
© 2014 Microsoft