Export (0) Print
Expand All

FileSubmitConnection.Execute Method (XPathNavigator) (Microsoft.Office.InfoPath)

Overrides the default Execute method to allow specifying a different source of data to submit.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

public abstract void Execute (
	XPathNavigator input



An XPathNavigator that is positioned at the XML node of the form that contains the data to submit.

Exception typeCondition


The submit operation failed.


The parameter passed to this method is null.


The parameter passed to this method isnot valid. For example, it is of the wrong type or format.

This method overrides the default Execute method (inherited from the DataConnection base class), which submits the data that is declaratively defined in the form template. The XPathNavigator object specified for the input parameter should point to an XML element which contains the data to be submitted. The data to submit can be in specified by any DataSource object.

Setting the input parameter to null has the same effect as using the default Execute method to submit data using the declarative settings defined in the form template.

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 Office InfoPath 2007 or in a Web browser.

In the following example, the Execute(input) method is used to perform a submit operation to the SharePoint Library defined by FileSubmitConnection object to submit the contents of the UniqueValue node in the main data source of the form.

public void ExecuteInput_Clicked(object sender, ClickedEventArgs e)
   string UniqueValueXPath = "/my:myFields/my:UniqueValue";
   XPathNavigator mainNavigator = MainDataSource.CreateNavigator();
   XPathNavigator uniqueValueNavigator = 
   FileSubmitConnection submitConnection = 
      (FileSubmitConnection)(DataConnections["SharePoint Library"]);

Community Additions

© 2014 Microsoft