all groups > asp.net building controls > april 2005 >
You're in the

asp.net building controls

group:

Enabled / Disabled my control


Re: Enabled / Disabled my control recoil NO[at]SPAM community.nospam
4/21/2005 1:32:48 PM
asp.net building controls:
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.
Enabled / Disabled my control David
4/21/2005 4:11:49 PM
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!



Re: Enabled / Disabled my control David
4/22/2005 12:00:00 AM
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.




[quoted text, click to view]

AddThis Social Bookmark Button