nbruckelmyer
Programmer
I am trying to loop through my controls on my web page, and perform some operation on the textboxes. This don't seem to be working.
Thanks.
Dim oCurr As Object
'-Loop through each of the controls on the form
For Each oCurr In Me.Controls()
'- Check to see if the control is a text box
If TypeOf oCurr Is TextBox Then
'-If so, toggle the properties
If bEnable Then
oCurr.BackColor = System.Drawing.Color.White
Else
oCurr.backcolor = System.Drawing.Color.Gray
End If
End If
Next
Thanks.
Dim oCurr As Object
'-Loop through each of the controls on the form
For Each oCurr In Me.Controls()
'- Check to see if the control is a text box
If TypeOf oCurr Is TextBox Then
'-If so, toggle the properties
If bEnable Then
oCurr.BackColor = System.Drawing.Color.White
Else
oCurr.backcolor = System.Drawing.Color.Gray
End If
End If
Next