N
Nick
Hi - I'm trying to loop through the textboxes on a page to unlock them for
editing. The Enabled property is set to false, and the following code is on
an 'Edit' button on the form. Can anyone tell me why it doesn't work?
Thanks
Nick.
Code:
Dim frmCtrl As Control
For Each frmCtrl In Me.Controls
If TypeOf frmCtrl Is System.Web.UI.WebControls.TextBox Then
Dim textbox As System.Web.UI.WebControls.TextBox = frmCtrl
textbox.Enabled = True
End If
Next
editing. The Enabled property is set to false, and the following code is on
an 'Edit' button on the form. Can anyone tell me why it doesn't work?
Thanks
Nick.
Code:
Dim frmCtrl As Control
For Each frmCtrl In Me.Controls
If TypeOf frmCtrl Is System.Web.UI.WebControls.TextBox Then
Dim textbox As System.Web.UI.WebControls.TextBox = frmCtrl
textbox.Enabled = True
End If
Next