VB.Net Clear All TextBoxes

How To Clear All TextFields Using Visual Basic.Net

Remove Text From All TextBoxes In VB.Net



In this VB.Net Tutorial we will see How To Remove Text From All TextBoxes Inside A Form On Button Click Event In Visual Basic.Net Programming Language And Visual Studio IDE .




Project Source Code:

Public Class ClearAllTextBoxes

    Private Sub ButtonClear_Click(sender As Object, e As EventArgs) Handles ButtonClear.Click

        For Each c As Control In Controls

            If c.GetType() = GetType(TextBox) Then

                c.Text = ""

            End If

        Next

    End Sub
End Class
                                       

////// OUTPUT : 

set all textboxes text to empty using vbnet



Share this

Related Posts

Previous
Next Post »