Controls with subcontrols invisible outside the controle, how can I do it?

T

ThunderMusic

Hi,
I've already seen this thing in here, but can't find it anymore... What I
need to do is the following :

<test:MyControl>
<test:MySubControl />
<test:MySubControl />
</test:MyControl>

actually 2 questions :
1) How can I do it so when I press < between both <test:MyControl> tags only
<test:MySubControl> appears? right now I can do it with an in between
element using ParseChildren(true) and PersistChildren(true) on the control
class and PersistMode(PersistModes.innerProperty) on the property that
contains the subcontrols...

2) How can I hide <test:MySubControl> from the other context? I mean, I want
it to be visible only when I'm between <test:MyControl> and
</test:MyControl>...

Can it be done? I'm pretty sure it can because 1) asp:DropDownList does it
and 2) asp:ListItem can only be a subcontrol (to DropDownList as example)

thanks

ThunderMusic
 
T

ThunderMusic

ok, I found the answer for question #1 : ParseChildren(true,
"MyCollectionProperty"), PersistChildren(false) on the class and
PersistMode(PersistModes.Attribute) on the 'MyCollectionProperty'... ;)

now, someone knows about question #2?

thanks

ThunderMusic
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top