· 1 min read
Adding a ItemTemplate into a repeater the new way
A colleague recently found a very easy way to add a ItemTemplate into your repeater without having to create the ‘classic’ myTemplate : ITemplate class. So a nice example of how less can be more:
rptPager.ItemTemplate = new CompiledTemplateBuilder(new BuildTemplateMethod(BuildItemTemplate))
void BuildItemTemplate(Control container ) {
LinkButton lbPage = new LinkButton() { ID = "lbPage" };
container.Controls.Add(lbPage );
}

Albert-Jan Schot
CTO, Microsoft MVP & FastTrack Recognized Solution Architect
I am Albert-Jan Schot, CTO at Blis Digital, Microsoft MVP, and FastTrack Recognized Solution Architect focused on Microsoft 365, Azure, and AI agents. I help teams turn complex Microsoft Cloud challenges into practical architecture decisions and shipped outcomes.
Zuid Holland, Netherlands


