all groups > asp.net building controls > october 2005 >
You're in the

asp.net building controls

group:

Custom asp.net control using collection - Design Time Refresh



Custom asp.net control using collection - Design Time Refresh Patrick
10/7/2005 5:45:01 AM
asp.net building controls: I have a custom asp.net control that uses a collection class to store items.
Properties modified for each item cause the design time window to refresh, I
am using the "ParentNotify" attribute, this works well. I also am using a
composite control designer class that renders the control very well.

My only complaint/question is: how can I refresh the design time surface
when items are added to the collection? The only way to refresh the design
Re: Custom asp.net control using collection - Design Time Refresh Ken Dopierala Jr.
10/10/2005 1:54:19 PM
Hi Jeff,

Check out the Free Ultra Menu at http://OTBTechSystems.Com ,you can download
it from the Features page. The control uses a custom built Editor to update
it's collection. In the code for the Editor you can see where it marks the
collection as dirty and forces VS.Net to update it's design-time view while
you are still in the editor. The code is 100% VB.Net. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.


[quoted text, click to view]

Re: Custom asp.net control using collection - Design Time Refresh Ken Dopierala Jr.
10/10/2005 2:04:12 PM
Oops...I mean "Hi Patrick". That's what I get for copy & paste! ;-}

[quoted text, click to view]

Re: Custom asp.net control using collection - Design Time Refresh Patrick
10/13/2005 5:21:07 AM
Thanks, I checked out that project and I see how it works. However our
control exposes a read only property for the collection.

Is there any other way to notify the design time of changes to the
collection? I also noticed that when collection items are removed they are
not removed from the code behind on the page. I am sure this has something
to do with the notification failing. This causes problems when you
add/remove/ and add collection items again because it orphans declarations
for each item you remove.

Maybe I need to find a way to remove the "readonly" from the property.
Seems like we had some trouble with the collection and viewstate unless it
was read only.


[quoted text, click to view]
AddThis Social Bookmark Button