Disable controls on a page

T

tshad

I have a page that has about 20 textboxes and dropdowns that I want to
disable until a button is pushed.

I don't want them to be hidden which I can do with <div visible=false
runat=server> or <asp:panel visible=false runat=server>. I want them to see
the whole page but just disable all the controls on the bottom 3/4 of the
page.

I could do it by just doing each control one at a time but then if I add or
take a control off the page I would need to remember to enable and disable
it at the proper time.

Thanks,

Tom
 
D

David Wier

This code sample is actually for something very different, however, it shows
how to iterate through all your controls - - you can use enabled =
true/false as the outcome
 
T

tshad

David Wier said:
This code sample is actually for something very different, however, it
shows
how to iterate through all your controls - - you can use enabled =
true/false as the outcome

Which code sample?

Also, is it in the order of how is displayed on the screen? I want the
first 4 textboxes not be enabled and the rest disabled until I am ready.

Sounds like what I am looking for.

Thanks,

Tom
 
T

tshad

That's OK. I have a little brain fade myself at least once a day. :)

That was exactly what I was looking for.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top