I have tabcontrol of three tabs and each tabs contains textbox and i want to clear all textboxes in each tabs and a one click of button(button event or any alternate way to clear all textboxes)
i have already tried many code however that only effective for first tab only
Private Sub ClearFields(ByVal cntr As Control)
For Each page As TabPage In TabControl1.TabPages
For Each ctl As Control In page.Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
If TypeOf ctl Is ComboBox Then
ctl.Text = ""
End If
If ctl.HasChildren Then
For Each thing As Control In ctl.Controls
If TypeOf thing Is TextBox Then
thing.Text = ""
End If
Next
End If
Next
Next
End Sub