SubmitToHostEventArgs class

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

Inheritance hierarchy

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)

Syntax

'Declaration
Public Class SubmitToHostEventArgs _
    Inherits EventArgs
'Usage
Dim instance As SubmitToHostEventArgs
public class SubmitToHostEventArgs : EventArgs

Remarks

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.

Examples

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

Protected Sub XmlFormView1_SubmitToHost(ByVal sender As Object, ByVal e As Microsoft.Office.InfoPath.Server.Controls.SubmitToHostEventArgs) Handles XmlFormView1.SubmitToHost
    TextBox2.Text = e.AdapterName.ToString()
    If e.ReturnStatus = True Then
        TextBox3.Text = e.ReturnStatus.ToString()
    Else
        TextBox3.Text = e.ErrorMessage.ToString()
    End If
End Sub
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();
    }
}

Thread safety

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

See also

Reference

SubmitToHostEventArgs members

Microsoft.Office.InfoPath.Server.Controls namespace