views:

67

answers:

0

I have a templated databound control with several templates. I want to extend this with some new functionality. Ideally I want to do something like this:

 <MyControl runat="server">
     <ClassTemplate ClassName="Article">
     template definition comes here
    </TemplateClass>
     <ClassTemplate ClassName="News">
      template definition comes here
     </TemplateClass>
     <ClassTemplate ClassName="BlogPost">
      template definition comes here
     </TemplateClass>
    </MyControl>

Based on the class of the bound objects, I can select the appropriate template. Is this possible?