I have an asp.net page that I want to set all of the dropdownlist properties with a button click. I have the following code and this is the error I am getting.
Dim ctlControl As Control
For Each ctlControl In Page.Controls
If ctlControl Is Control.DropDownList Then
ctlControl.Enabled = False
Here is the error:
Compiler Error Message: BC30456: 'DropDownList' is not a member of 'System.Web.UI.Control'.
I am not sure what I am doing wrong or if I am even going at it the right way.