Child controls persistence.

P

Patrice Scribe

I'm trying to create a control that builds other child controls at design
time...

I've been able to persist my own collection of child controls but I can't
succeed when trying to just work with the "standard" controls collection.
How do I do that ? (I've got something "ambiguous" at design time when I try
this).

Using www.bluevisionsoftware.com sample chapters for a Tab control as a
start.

From a sample it looks like PersistChildren(True) would be enough ?

TIA. Patrice
--
 
M

MSFT

Hi Patrice,

I browsed to www.bluevisionsoftware.com, but I haven't found sample
chapters for a Tab control you mentioned. Can you explain more about what
you mean "the 'standard' controls collection", and what do you want with
the custom web control?


Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
P

Patrice Scribe

The exact URL is
http://www.bluevisionsoftware.com/WebSite/Books/CustomControlsAndDesigners/Samples/Chapter16.pdf

It persists a custom Tabs collection using :
- ParseChildren(true,"Tabs")
- PersistChildren(false) at class level

- DesignerSerializationVisibility(content)
- PersistenceMode(InnerDefaultPropery) at the Tabs property level.

This one works.

Now, I would like to be able to have a control that let me create ASP.NET
child controls at design time and I'm trying to use the "standard" Controls
collection for this purpose. When I add controls to this collection they are
visible in the design view but it looks like I can't persist them. If I
apply those attributes to the Controls collection I've got an error message
about something "ambiguious" (translated from french) in the design view of
my control. A simple sample would be welcome (just a control whose designer
adds control to its standard controls collection and persists them as
childs).

For now, this is rather to familiarize myself with design time support. On
a longer run, I would like to be able to bind a control to a datasource and
to have this control creating automatically suitable child controls for each
of the datasource column.

TIA

Patrice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top