D
disaia
I saw the C# solution:
for each Control c in Page.Controls
if c is WebControl --> ((WebControl)c).Enabled = False / true /
variable
But could figure out the VB syntax.
The closest I got was this:
Dim ctl As Control
For Each ctl In Page.Controls
if typeof(ctl) is TextBox then ((TextBox)c).Enabled =
False
Next
But I get a syntax error. Anybody know how to correct this?
If there is a more elegant solution, I'd surely like to know.
Thanks,
for each Control c in Page.Controls
if c is WebControl --> ((WebControl)c).Enabled = False / true /
variable
But could figure out the VB syntax.
The closest I got was this:
Dim ctl As Control
For Each ctl In Page.Controls
if typeof(ctl) is TextBox then ((TextBox)c).Enabled =
False
Next
But I get a syntax error. Anybody know how to correct this?
If there is a more elegant solution, I'd surely like to know.
Thanks,