Prevent certain tags inside custom control

Discussion in 'ASP .Net Building Controls' started by MRe, Aug 24, 2006.

  1. MRe

    MRe Guest

    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
    MRe, Aug 24, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ranganath

    Custom Tags within Custom Tags.

    Ranganath, Oct 17, 2003, in forum: Java
    Replies:
    2
    Views:
    436
    Ranganath
    Oct 21, 2003
  2. A. Brinkmann
    Replies:
    2
    Views:
    1,061
    A. Brinkmann
    Apr 16, 2004
  3. Dave
    Replies:
    0
    Views:
    436
  4. Simon
    Replies:
    1
    Views:
    275
    Yuriy Solodkyy
    Jun 11, 2007
  5. Mike Gleason jr Couturier

    Custom tags inside control

    Mike Gleason jr Couturier, Jul 15, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    113
    Peter Bucher [MVP]
    Jul 21, 2008
Loading...

Share This Page