October 2010
Intermediate to advanced
1920 pages
73h 55m
English
The previous section discussed the ITemplate interface’s InstantiateIn() method. Normally, you don’t implement the InstantiateIn() method; you let ASP.NET Framework do it for you. However, if you want to supply a control with a default template, you need to implement this method.
The modified Article control in Listing 37.3 includes a default template for the ItemTemplate. The default template is used when an ItemTemplate is not supplied.
Listing 37.3. ArticleWithDefault.cs


The control in Listing 37.3 is similar to ...
Read now
Unlock full access