HighTechTalks DotNet Forums  

Prevent certain tags inside custom control

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Prevent certain tags inside custom control in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MRe
 
Posts: n/a

Default Prevent certain tags inside custom control - 08-24-2006 , 10:07 AM






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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.