XmlFormView.Initialize Event
Handles the initialization event of a form in a XmlFormView control.
Namespace: Microsoft.Office.InfoPath.Server.Controls
Assembly: Microsoft.Office.InfoPath.Server (in Microsoft.Office.InfoPath.Server.dll)
Syntax
'Declaration
Public Event Initialize As EventHandler(Of InitializeEventArgs)
'Usage
Dim instance As XmlFormView
Dim handler As EventHandler(Of InitializeEventArgs)
AddHandler instance.Initialize, handler
public event EventHandler<InitializeEventArgs> Initialize
Remarks
This event represents one of four events of the XmlFormView control that allows communication of a form in the control to the Web page in which the control is hosted. Read-only properties of the form can be queried after the form is opened but before it is shown in the control. These properties are available through the XmlForm property of the XmlFormView control.
Examples
In the following example, the EditingStatus property of the form is shown in a text box located on the Web page.
[Visual Basic]
Protected Sub XmlFormView1_Initialize(ByVal sender As Object, ByVal e As Microsoft.Office.InfoPath.Server.Controls.InitializeEventArgs) Handles XmlFormView1.Initialize
TextBox11.Text = XmlFormView1.EditingStatus.ToString()
End Sub
[C#]
protected void XmlFormView1_Initialize(object sender, InitializeEventArgs e)
{
TextBox11.Text = XmlFormView1.EditingStatus.ToString();
}