Click here to Skip to main content
15,616,520 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have written the code in my class file -

For Each Control In Controls
            If (Controls.GetType() Is GetType(TextBox)) Then
                Control.Text = String.Empty
            End If

but this is showing errors.
Updated 11-Aug-15 23:45pm
Animesh Datta 12-Aug-15 5:55am    
what error you are getting ?
M.R.A. 12-Aug-15 6:50am    
Controls is not a member
[no name] 12-Aug-15 6:59am    
Replase this
If (Controls.GetType() Is GetType(TextBox)) Then
with this
If (Control.GetType() Is GetType(TextBox)) Then

It's only a small typo :)

1 solution

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900