Federik Kalseth has a great easy-to-understand post on using template controls programmatically. Serves as a great review of templated controls since I needed to refresh my memory on how they worked. 
Here's another post on Template Control Catch-up in ASP.NET:
http://weblogs.asp.net/leftslipper/archive/2007/01/18/How-to-instantiate-templates-properly.aspx
http://weblogs.asp.net/vga/archive/2003/08/11/23498.aspx