Enabled / Disabled my control

Discussion in 'ASP .Net Web Controls' started by David, Apr 21, 2005.

  1. David

    David Guest

    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!
    David, Apr 21, 2005
    #1
    1. Advertising

  2. 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

    "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!
    >
    >
    >
    Kannan.V [MCSD.net], Apr 25, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Brown
    Replies:
    1
    Views:
    4,332
    DWinter
    Aug 8, 2003
  2. Dennis Johansson
    Replies:
    1
    Views:
    490
    Dennis Johansson
    Aug 21, 2003
  3. Gabor
    Replies:
    3
    Views:
    601
    Jacob Yang [MSFT]
    Aug 26, 2003
  4. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Replies:
    2
    Views:
    6,466
    rick74
    May 27, 2008
  5. David

    Enabled / Disabled my control

    David, Apr 21, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    138
    David
    Apr 22, 2005
Loading...

Share This Page