InfoPathEditor.SetSubmitToHostEventHandler method

Sets the event handler in the host application for handling the Submit method of the SubmitToHostAdapter object.

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

Syntax

'Declaration
Sub SetSubmitToHostEventHandler ( _
    pHandler As ISubmitToHostEventHandler _
)
'Usage
Dim instance As InfoPathEditor
Dim pHandler As ISubmitToHostEventHandler

instance.SetSubmitToHostEventHandler(pHandler)
void SetSubmitToHostEventHandler(
    ISubmitToHostEventHandler pHandler
)

Parameters

Remarks

Sets the function in the host application that is used as the callback function when submitting data back to the host application. To configure the data connection for submitting to the host application, open the form template in InfoPath design mode, click Submit Options on the Tools menu, select the Allow users to submit this form check box, select Hosting environment in the drop-down list, and then click Add.

For more information about the InfoPathEditor and the FormControl objects , see the MSDN article Hosting the InfoPath Form Editing Environment in a Custom Windows Form Application and the "The InfoPath Editor Hosted As a Control" section of What's New for InfoPath Developers.

See also

Reference

InfoPathEditor interface

InfoPathEditor members

Microsoft.Office.Interop.InfoPath namespace