Prevent certain tags inside custom control

M

MRe

Hi,

I'm not sure if I can ask here as it may be a visual studio specific
question, but maybe[?]

Is it possible to add a constraint to a custom control to prevent controls
that are not inherited from a specified class from showing up in
intellisence and/or displaying an error during compile when adding children
to that control; so if I have a control that builds a toolbar, used like..

<cel:toolbar runat="server">
<cel:button runat="server" name="joe" action="act" />
<cel:textbox runat="server" name="bob" action="ion" />
<... other cel:interface dealies ... />
</cel:toolbar>

..then inside <cel:toolbar> I only want <cel:button> <cell:textbox>
appearing in intellisence, and not <asp:...> and <hr> and whatnot. At the
moment I have it write an error at runtime if an illegal tag is added, it
would be nice to catch it sooner.

Thank you for any helps,
Regards,
Eliott
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top