Share via


FormControl.SetSubmitToHostEventHandler Method

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

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

Syntax

'Declaration
Public Overridable Sub SetSubmitToHostEventHandler ( _
    handler As ISubmitToHostEventHandler _
)
'Usage
Dim instance As FormControl
Dim handler As ISubmitToHostEventHandler

instance.SetSubmitToHostEventHandler(handler)
public virtual void SetSubmitToHostEventHandler(
    ISubmitToHostEventHandler handler
)

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 FormControl object, see Hosting the InfoPath Form Editing Environment in a Custom Windows Form Application.

See Also

Reference

FormControl Class

FormControl Members

Microsoft.Office.InfoPath Namespace