ErrorText Property
Topic Last Modified: 2006-11-30
The low-priority error message. The ErrorText property applies to the ControlEventArgs Class.
Syntax
Property ErrorText As String
string ErrorText
Remarks
This property is read-only.
Example
The following Visual Basic .NET example shows a ControlError Event handler function that displays the error text.
Private Sub OnControlError(ByVal o As Object, ByVal e As EventArgs) _
Handles treeView.ControlError
' Declare the ControlEventArgs object.
Dim evtArgs As ControlEventArgs
' Cast e to a ControlEventArgs object.
evtArgs = CType(e, ControlEventArgs)
Debug.WriteLine("Error text: " + evtArgs.ErrorText)
End Sub
The following C# example shows a ControlError Event handler function that displays the error text.
void OnControlError(object o, EventArgs e )
{
// Cast e to a ControlEventArgs object.
ControlEventArgs evtArgs = (ControlEventArgs)e;
Debug.WriteLine("Error text: " + evtArgs.ErrorText);
}