ASP.Net ITemplate - ways of declaring
Posted
by Mahes
on Stack Overflow
See other posts from Stack Overflow
or by Mahes
Published on 2010-04-09T20:18:09Z
Indexed on
2010/04/09
20:23 UTC
Read the original article
Hit count: 410
when we want to define a Template in our user controls we declare a field like this in our user controls
public ITemplate MyTemplate { get; set; }
so that the user defined templates contents will be represented in MyTemplate, and you can use it.
and there are ways to customize the templates, for example
[TemplateInstanceAttribute(TemplateInstance.Single)]
public ITemplate MyTemplate { get; set; }
the above example will enable defines single instance Templates(http://www.nikhilk.net/SingleInstanceTemplates.aspx).
i accidentally came across single instance templates and blown away by the power of it.
my question is what are all the things possible with ITemplates?? how do we define(use) them (more specifically thru annotations). is there any good documentation available for ITemplates?? (please dont point to msdn)
© Stack Overflow or respective owner