Skip to content
Albert-Jan Schot
Albert-Jan Schot

· 1 min read

Post

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

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.

Copilot Studio Microsoft 365 Agent Flows

Zuid Holland, Netherlands

Related Posts