Validating two user controls
The validation triggers a messagebox which is always shown even if the user wants to cancel editing/adding an object because the validating happens before the button-click.
It assigns a new Xml Schema Set object to variable schemas, and calls this object's Add method to add a schema to the collection.
This program validates the XML document against the schema successfully.
However, when the user selects the XML document catalog1.xml, validation fails for the book element in the lines containing more than one title element.
Controls Clear Text Box(ctrl) If Type Of ctrl Is Text Box Then CType(ctrl, Text Box). Empty End If Next ctrl End Sub Private Sub Button2_Click(By Val sender As System.
Thanks in advance Public Sub Check Empty Textbox(Byval groupbox as Group Box) Dim txt as control For Each txt in groupbox. Text="" Then Msg Box("Please Input data to textbox.") Exit For End IF End IF Loop End Sub Public Sub Clear Text Box(By Val root As Control) For Each ctrl As Control In root. Click Clear Text Box(Me) End Sub Private Sub Text Box3_Text Changed(sender As Object, e As Event Args) Handles Text Box3.
It can validate an XML document as it reads and parses the document.