Dim tp As TabPage = Nothing
Dim c As Control = Nothing
For Each tp In Me.TabControl1.TabPages
For Each c In tp.Controls
If TypeOf c Is TextBox Then
DirectCast(c, TextBox).Text = String.Empty
End If
Next
Next
In the past I discovered that the only way I was able to get that to work was
Code:
Dim tp As TabPage = Nothing
Dim c As Control = Nothing
For Each tp In Me.TabControl1.TabPages
For Each c In tp.Controls
If [b]c.GetType[/b] Is [b]GetType([/b]TextBox[b])[/b] Then
DirectCast(c, TextBox).Text = String.Empty
End If
Next
Next
Theboldsections are what I needed to add to get it to work so now thats what I use.
Senior Qik III, ASP.Net, VB.Net ,SQL Programmer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECT * FROM Users WHERE clue > 0
0 Rows Returned
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.