Refreshing web-control in designer

Discussion in 'ASP .Net Web Controls' started by hammad.awan_nospam@gmail.com, May 25, 2006.

  1. Guest

    Hello,

    I have a web control I have developed that is derived from composite
    control. On it, I have a property that is called IsBlahBlahVisibile.
    When this property changes, it is supposed to hide or show a control
    that is contained by it. I have associated a CompositeControlDesigner
    class with the said web control, and overrode a single function
    GetDesignTimeHtml. All this function does is renders the web control
    to an HtmlTextWriter object and returns it as a string. When I debug
    into this code using another instance of VS, the code is indeed called
    and the property value IsBlahBlahVisible has the correct value when I
    change that property in the designer. However, the design page is not
    updated and the control is not redrawn. How do I get this control to
    redraw when I change the property?

    I have tried setting the RefreshProperties attribute and that doesn't
    work. I've tried setting the NotifyParentProperty and that doesn't
    work.

    If I go from source view, back to design view after changing the
    property, the control is redrawn and it appears correctly. But, I
    would like to update the design time view for the control as soon as
    the property value changes.

    Where in the .NET Framework infrastructure do I need to update code so
    that this above said functionality works?

    Thanks,

    Hammad
    , May 25, 2006
    #1
    1. Advertising

  2. Guest

    I think this article will help you out.

    http://msdn.microsoft.com/library/e...ETContDev.asp?frame=true#aspnetcontdev_topic5

    The articles by Dino Esposito are the best on that topic I have read.

    Make sure you are calling EnsureChildControls each time you change a
    property. That may be your exact issue.

    This article may also be useful.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNETContDev.asp

    Pay attention to what he writes about EnsureChildControls and
    ChildControlsCreated.

    Brennan
    , May 25, 2006
    #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. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    457
    =?Utf-8?B?Y2xpY2tvbg==?=
    Aug 4, 2006
  2. Steve B.
    Replies:
    4
    Views:
    964
    Cheryl D Wise
    Jun 1, 2007
  3. Alexander Higgins
    Replies:
    3
    Views:
    1,075
    Teemu Keiski
    Jul 30, 2007
  4. Stuart Campbell

    Designer not refreshing display

    Stuart Campbell, Apr 30, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    79
    Stuart Campbell
    Apr 30, 2004
  5. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 3, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    186
    Harlan Messinger
    Aug 3, 2006
Loading...

Share This Page