Binding data to a Repeater using Lazy Loading (ASP.NET C#)
Lazy loading is a method of only loading data as and when you need it. Rather than loading it on page load, you can define a property that can then be bound to a WebControl. For example, in the page is an asp:Repeater : <asp:Repeater ID="MyRepeater" DataSource='<%# MyData %>' runat="server"> <HeaderTemplate><ul></HeaderTemplate> <ItemTemplate><li><a href="<%# Eval("Url") %>"><%# Eval("Text") %></a> (Record ID: <%# Eval("RecordID") %>)</li></ItemTemplate> <FooterTemplate></ul></FooterTemplate> </asp:Repeater> MyData in the DataSource attribute of asp:Repeater is a property defined in the CodeBehind page: private DataTable _MyData; public DataTable MyData { get { if (_MyData == null) { _...