Enabled / Disabled my control

D

David

Hi,

My Control (inherits from System.Web.UI.Control) has the Enabled property
that enabled a button inside of my control. The problem is that in the page
that has the control has a button ("Edit") to set the Enabled property to
true and when is pressed first load and build the control, and then the
event handler of the edit button where set the Enabled property = true,
then the Buttons inside the Control are not enabled.
Somebody know some solution to that?

Thanks!
 
R

recoil

The question does not make much sense and neither does your english. I
would hazard a guess and say that this is a ViewState issue. In which
case you need to realize that when a Control is enabled and disabled
you have to be very careful on when you set properties as they may not
be set in time to get put into the ViewState. Also if you have
overridden the Enabled property of your control then you may have other
issues that are effecting the aforementioned behavior.
 
D

David

Ok, my english isn't good, I'll try to explain me again.
I want to set the property ActiveButtons from mi control to true, when the
button "Active_Buttons", on the page container of my control, is clicked,
but... first load myControl then load the page and finally the event-handler
of "Active_Buttons" where set the property ActiveButtons to true, the
problem is that the controls is already constructed when the property is
setted and the change is showed in the next PostBack.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top