Skip to content

Instantly share code, notes, and snippets.

@niwatpumkin
Created September 15, 2014 03:55
Show Gist options
  • Save niwatpumkin/ba1d76c1e5cefb56814d to your computer and use it in GitHub Desktop.
Save niwatpumkin/ba1d76c1e5cefb56814d to your computer and use it in GitHub Desktop.
Protected Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
ClearTextBox(Me)
End Sub
Public Sub ClearTextBox(ByVal root As Control)
For Each ctrl As Control In root.Controls
ClearTextBox(ctrl)
If TypeOf ctrl Is TextBox Then
CType(ctrl, TextBox).Text = String.Empty
End If
Next ctrl
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment