ITemplate, TemplateContainer questions

  • Thread starter Thread starter Steve Richter
  • Start date Start date
S

Steve Richter

trying to understand how to support templates in server controls ...

a few quick questions on the following snippet of code pulled from a
server control class:

ITemplate _headingStyle;

[TemplateContainer(typeof(ICollectionLister2))]
public ITemplate HeadingStyle
{
get{ return _headingStyle; }
set{ _headingStyle = value; }
}

I thought ITemplate was an interface. How is it being used here as a
class?

What does the "[TemplateContainer(typeof(ICollectionLister2))]" stmt
line do when it proceeds the property "HeadingStyle"?

thanks,

-Steve
 
TemplateContainer attribute specifies the type of the control which is the
naming container for the child controls in the template. Page parser uses it
when you use Container keyword in databinding syntax (for example
<%#Container.TypedPropertyHere%>)
 
Back
Top