Search code examples
.netasp.netlistviewpaginationdatapager

Asp.net listview paging without havind all records in memory


In my asp.net page I have a listview that has a datapager defined in the LayoutTemplate. The listview is databound to a list of records. I know the total number of records ... but I don't load them from the db. I want to tell the pager at first request the total number of records and let it generate the pages and navigation. When the user click a page from the datapager I want to load the records from the db and update the listview binding to display results from that page.

Is this possible with the listview and datapager from asp.net?

Thanks, Radu


Solution

  • After more research I found this article that describe how to cache data and use it with the ObjectDataSource. Probably you know all this ... but I am new with asp.net.

    Caching data in Asp.net