SubmitToHostEventArgs - Classe
Utilisé pour renvoyer des informations à propos de la soumettre à l'opération hôte d'un modèle de formulaire InfoPath hébergé.
Hiérarchie d’héritage
System.Object
System.EventArgs
Microsoft.Office.InfoPath.Server.Controls.SubmitToHostEventArgs
Espace de noms : Microsoft.Office.InfoPath.Server.Controls
Assembly : Microsoft.Office.InfoPath.Server (dans Microsoft.Office.InfoPath.Server.dll)
Syntaxe
'Déclaration
Public Class SubmitToHostEventArgs _
Inherits EventArgs
'Utilisation
Dim instance As SubmitToHostEventArgs
public class SubmitToHostEventArgs : EventArgs
Remarques
Utilisez l'objet SubmitToHostConnection à partir de l'espace de noms Microsoft.Office.InfoPath pour effectuer des actions non prises en charge par des règles ou d'une autre logique déclarative. Pour plus d'informations sur la création d'une connexion de données SubmitToHostAdapter d'un modèle de formulaire InfoPath, voir Hosting the InfoPath Form Editing Environment in a Custom Web Form.
Exemples
Dans l'exemple suivant, les propriétés de l'objet SubmitToHostEventArgs sont utilisées pour remplir les zones de texte dans la page Web.
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();
}
}
Cohérence de thread
Tous les membres statique (Partagé dans Visual Basic)s publics de ce type sont thread-safe. Cela n’est pas garanti pour les membres d’instance.