Home All Groups Group Topic Archive Search About
Author
21 Apr 2005 7:04 PM
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!

Author
25 Apr 2005 11:24 AM
Kannan.V [MCSD.net]
hi david,

how are you trying to set the edit property inside the control on button
click.
Basically a webcontrol is created everytime the page i sloaded or posted back.
are yo u setting any property inside the createchild controls method setting
the edit property to some default value.

if not, you have to read the property value and set the enable/disable
accordingly in the render method of the control.
The render method of the control is where u have ultimate control for the
web control before its rendered to the page.

Hope this helps you,
regds
Kannan.V

Show quoteHide quote
"David" wrote:

> 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!
>
>
>