Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Refreshing web-control in designer

Reply
Thread Tools

Refreshing web-control in designer

 
 
hammad.awan_nospam@gmail.com
Guest
Posts: n/a
 
      05-25-2006
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

 
Reply With Quote
 
 
 
 
offwhite@gmail.com
Guest
Posts: n/a
 
      05-25-2006
I think this article will help you out.

http://msdn.microsoft.com/library/en...contdev_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/de...NETContDev.asp

Pay attention to what he writes about EnsureChildControls and
ChildControlsCreated.

Brennan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Designer Property Serialization -- Sycning inner properties to designer property window Alexander Higgins ASP .Net Building Controls 3 07-30-2007 09:09 PM
Sharepoint Designer/ Expression Web Designer : adding item in toolbox ? Steve B. ASP .Net 4 06-01-2007 04:29 AM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net Web Controls 0 08-03-2006 12:29 PM
Designer not refreshing display Stuart Campbell ASP .Net Web Controls 0 04-30-2004 02:46 PM



Advertisments