I have a listview control in a page and i want to do a custom server paging for the listview data. So instead of getting whole data and keeping in the memory, I would like to bring data in chunks and then bind the listview control.
For example:
If I request
http://www.mywebsite.com/getlistofdata.aspx?p=1, the first page come with 10 items http://www.mywebsite.com/getlistofdata.aspx?p=2, the second page comes up with another 10 items and likewise.
I have written a function BindListView(int pageNumber, int pageSize, out int totalRowsCount) that returns me the data according to the page number and page size passed.
How can I make the Datapager work in this situation?
The problem is it shows one link to navigate for only one page, i need to populate the datapager according to the value of totalRowsCount.