easy one again!

  • Thread starter Thread starter Jorge Ribeiro
  • Start date Start date
J

Jorge Ribeiro

Hello

I've an asp.net page that, of course, has serveral
buttons,
text boxes and other kind of controls in it...

i need now to have them all disabled, or a lot of them,
and i'm searching for the best/elegant way to do it...

i managed to create a for cycle to iterate all the page's
form's controls
but usign page.controls.item(x) i can't find the enabled
property... only visible one...

how can i do this?!?!
how can i disable a bunch of controls using a for next
command instead of doing it one by one?!?!

best regards

JR
 
If all your controls are web controls (have WebControl class as a base class
somewhere in the inheritence hierarchy), you can cast it to WebControl in
your loop, and have access to the Enabled property.
 
Back
Top