G
Guest
I've got a webform and many controls on it. I would like to iterate thru the
control collection to get all the textboxes control to let me change the text
property. Here is my code...for unknown reason, this loop iterates only 3
times! Help please! Thanks!
Dim Control As Web.UI.Control
Dim TextBox As System.Web.UI.WebControls.TextBox
For Each Control In Controls
If TypeOf (Control) Is System.Web.UI.WebControls.TextBox Then
TextBox = CType(Control, TextBox)
TextBox.Text = ""
End If
Next
control collection to get all the textboxes control to let me change the text
property. Here is my code...for unknown reason, this loop iterates only 3
times! Help please! Thanks!
Dim Control As Web.UI.Control
Dim TextBox As System.Web.UI.WebControls.TextBox
For Each Control In Controls
If TypeOf (Control) Is System.Web.UI.WebControls.TextBox Then
TextBox = CType(Control, TextBox)
TextBox.Text = ""
End If
Next