templatecontrol

Replace CheckBoxList TemplateControl with custom UserControl?

I am trying to create a more detailed item template for the standard CheckBoxList control. It exposes an ITemplate property called TemplateControl but I wasn't able to find a straightforward resource on how to actually use it. Here's the code I have so far: Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) MyBase.OnLoad(e)...

Templated usercontrol with template properties

In C#, I'm trying to figure out a way to use properties inside a templated usercontrol. Let me try to explain what I mean through an exmaple: <example:myTreeOfItems runat="server"> <HeaderTemplate> <div> </HeaderTemplate> <IndentStartTemplate> <ul> </IndentStartTemplate> <ItemHeaderDefaultTemplate> ...

Help creating a Template control in ASP.NET

Hi all - I've never created a template control before in ASP.NET, so I'm trying to stumble my way through it! Basically, my template control looks like this: <%@ Control Language="C#" CodeFile="MyControl.ascx.cs" Inherits="Controls_MyControl" %> <h2><%= Heading %></h2> <div id="hide" runat="server"> </div> <div id="show" runat="server...