Force Refresh / Repaint of Page Control in Design Mode (IDE) ??

Discussion in 'ASP .Net' started by philaphan80@yahoo.com, Jun 1, 2007.

  1. Guest

    Is there a way to force the Visual Studio IDE (Page Control at design-
    time) to refresh / repaint itself upon drag & drop of *any* item from
    the toolbox? Perhaps a method I need to override within the page
    control?

    I'm aware of using
    "ComponentModel.RefreshProperties(RefreshProperties.All)" within
    custom controls, but that only refreshes the page when something
    specific to that custom control is changed. I'm looking for a way to
    hook into the method(s) that add *any* new control -- custom or
    standard (label, textbox, etc.) -- to the page so I can force a
    refresh of the entire page *every time* a control is added. It would
    also have to work when a control is renamed.

    For example:

    1. Drop custom validator control to page

    2. Custom control has logic in overriden Render() method to check if
    ControlToValidate control exists (e.g. "TextBox1"). If not, custom
    control paints itself as an error message for quick visibility in IDE,
    eliminating the need to build and debug before discovering the error.

    3. Drop TextBox control to page (default name would be "TextBox1").
    Custom control doesn't know to repaint itself, removing the error
    message, even though ControlToValidate now exists. Page control needs
    to somehow be told to repaint all controls when another is added or
    renamed.

    I hope this makes sense! Thanks in advance.
    , Jun 1, 2007
    #1
    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. John J Lee
    Replies:
    3
    Views:
    473
    bruno at modulix
    Dec 1, 2005
  2. Edward Loper
    Replies:
    0
    Views:
    461
    Edward Loper
    Aug 7, 2007
  3. John J Lee
    Replies:
    0
    Views:
    514
    John J Lee
    Aug 7, 2007
  4. zerg
    Replies:
    125
    Views:
    2,650
  5. ~~~ .NET Ed ~~~

    How to force a Web XML control to redraw/repaint?

    ~~~ .NET Ed ~~~, Mar 19, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    149
    ~~~ .NET Ed ~~~
    Mar 19, 2005
Loading...

Share This Page