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)
Syntax
'Declaration
Public MustOverride ReadOnly Property Uri As String
Get
'Usage
Dim instance As XmlForm
Dim value As String
value = instance.Uri
public abstract string Uri { get; }
Property Value
Type: System.String
The Uniform Resource Identifier (URI) of the form.
Remarks
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) formnameNew form
formnamePreviously 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.
Examples
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);
MessageBox.Show(Me.Uri)