Blocking a PostBack

G

Greg Smith

I am developing a form that uses a lot of Web Form controls (not HTML). I
disable certain controls in sequence, but as I click on other buttons on the
form the disabled controls get reset to their original state, enabled, and I
have to turn them off again.

Is there a way to keep this from happening?

Any help is greatly appreciated.
 
J

Jeff Evans

Greg Smith said:
I am developing a form that uses a lot of Web Form controls (not HTML). I
disable certain controls in sequence, but as I click on other buttons
on the form the disabled controls get reset to their original state,
enabled, and I have to turn them off again.
Is there a way to keep this from happening?
Any help is greatly appreciated.

Do these "other buttons" cause postbacks? If so, you will need to make sure
Viewstate is enabled or the "Enabled" property value for any controls you
set will not be remembered. In that case, you would have to set "Enabled"
to false explicity each request for each control, based on whatever criteria
you choose.
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top