Share via


XmlFormView.DataConnectionBaseUrl Property

Gets or sets the base URL that will replace the specified substring of the service URL for all relative Web services in the form.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property DataConnectionBaseUrl As Uri
    Get
    Set
'Usage
Dim instance As XmlFormView
Dim value As Uri

value = instance.DataConnectionBaseUrl

instance.DataConnectionBaseUrl = value
[BrowsableAttribute(false)]
public Uri DataConnectionBaseUrl { get; set; }

Property Value

Type: System.Uri
The base URL that will replace the specified substring of the service URL for all relative Web services in the form.

Remarks

Form templates containing Web service data connections can be modified to enable relative Web service URLs in place of the absolute Web service URLs used when the data connection is established in design mode. It requires modification of the manifest.xsf file of the form template in order to replace the xsf2:connectoid element with the xsf2:relativeQuery element, as in the example below. The replace attribute specifies the substring of the URL to replace at form initialization with the value set by the DataConnectionBaseUrl property.

<xsf2:webServiceAdapterExt ref="ExampleWebService" trackDataSetChanges="no">
    <xsf2:relativeQuery replace="https://ServerName/sites/SiteName" />
</xsf2:webServiceAdapterExt>

Notes

  • If the relativeQuery element does not exist in the manifest extension for the adapter, the full serviceURL specified in the manifest will be used.

  • If DataConnectionBaseUrl is a null reference (Nothing in Visual Basic) or Empty, the full serviceURL specified in the manifest will be used.

  • The DataConnectionBaseUrl must be a valid URL.

  • An error will occur if the webServiceAdapterExt element contains both the xsf2:connectoid and the xsf2:relativeQuery elements.

  • The DataConnectionBaseUrl property applies to all Web service data connections in the form.

See Also

Reference

XmlFormView Class

XmlFormView Members

Microsoft.Office.InfoPath.Server.Controls Namespace