Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SubmitToHostEventArgs class

Used to return information about the submit to host operation of a hosted InfoPath form template.

System.Object
  System.EventArgs
    Microsoft.Office.InfoPath.Server.Controls.SubmitToHostEventArgs

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

public class SubmitToHostEventArgs : EventArgs

Use the SubmitToHostConnection object from the Microsoft.Office.InfoPath namespace to perform actions not supported by rules or other declarative logic. For more information about creating a SubmitToHostAdapter data connection in an InfoPath form template, see Hosting the InfoPath Form Editing Environment in a Custom Web Form.

In the following example, properties of the SubmitToHostEventArgs object are used to populate text boxes in the Web page.

protected void XmlFormView1_SubmitToHost(object sender, SubmitToHostEventArgs e)
{
    TextBox2.Text = e.AdapterName.ToString();
    if (e.ReturnStatus = true)
    {
        TextBox3.Text = e.ReturnStatus.ToString();
    }
    else
    {
        TextBox3.Text = e.ErrorMessage.ToString();
    }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft