Just realized this is the buildingcontrols group. Check out PersistenceMode
and overriding the function GetPersistInnerHtml(). Ken.
"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:OGBpFPQhFHA.1248@TK2MSFTNGP12.phx.gbl...
> Hi Ken.
>
> Check out the aspnet.buildingcontrols newsgroup for a lot of posts
regarding
> this stuff. More than likely you need to add this attribute to the
property
> of the custom control that holds the collection:
>
> PersistenceMode(PersistenceMode.InnerDefaultProperty)
>
> That alone may do it. If not check out the aforementioned Microsoft
> newsgroup for a lot more information about controls. 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.
>
> "Ken Baltrinic" <ken.baltrinic@inforeliance.com> wrote in message
> news:11co73fr3pn3b56@corp.supernews.com...
> > I am trying to implement a custom server control which exposes a
> collection
> > and uses the ParseChildrenAttribute to populate it from child elements
of
> > the controls aspx markup. In fact I am simply starting with Microsoft's
> > "ParseChildrenAttribute Sample". I have made no changes to this sample
> and
> > am having the following problem. If I change any property (Visible for
> > instance) of the custom control (CollectionPopertyControl in the case of
> the
> > sample) using the Properties Window of the Web Form Designer, the aspx
> > markup for the collection is deleted as follows:
> >
> > What was orriginally:
> >
> > <Custom:CollectionPropertyControl Header = "Employees" id = "prop" runat
=
> > "server">
> > <Custom:Employee Name = "Alice" Alias = "AliceA" Title = "Manager" />
> > <Custom:Employee Name = "Jerry" Alias = "JerryR" Title = "Programmer" />
> > <Custom:Employee Name = "Lynn" Alias = "LynnP" Title = "Architect" />
> > <Custom:Employee Name = "Mike" Alias = "MikeB" Title = "Tester" />
> > </Custom:CollectionPropertyControl>
> >
> > becomes:
> > <Custom:CollectionPropertyControl Header="Employees" id="prop"
> > runat="server" Visible="False"></Custom:CollectionPropertyControl>
> >
> > How do I stop this from happening? I don't really need the collection
to
> be
> > editable from the web for designer. I am happy to maintain the values
by
> > editing the markup, BUT I do need the markup to survive the control's
> basic
> > properties being manipulated by the designer. I have tried seting the
> > collection property's Browsable attribute to false but that did not
solve
> > the problem.
> >
> > Suggestions?
> >
> >
>
>