As my site continues to grow, I must grow with it. The date and category archives pages consisted of a simple DataList that returned all the records on one page. I decided that this had to go, so I ditched the DataList control for a DataGrid instead. The reason I chose the DataGrid control, is because it provides instant results, while maintaining flexibility for future enhancements. I used An Extensive Examination of the DataGrid Web Control to guide me through this process. By reading through the article, I was able to easily create, and implement the necessary data access features of ASP.NET to get my pages up and running in a matter of minutes.
Although the default paging feature is a great idea at this stage of my web sites life cycle, it will eventually have to change. In the future I will need to update to 'custom paging', because default paging has a severe limitation ? it queries and returns all the records each time. For example, let?s say my archive data for the category 'Web Forms' has 100 records. Every time a new page is requested for that category, the user will only see the next ten results, but behind the scenes, the data objects are returning all 100 of those records with each hit.
For my situation, I think swapping the DataList for the DataGrid and its default paging features is a great idea?at the current time. As my site continues to grow, I will eventually have to change the default feature of the DataGrid paging, and implement my own custom methods to handle the data in a more efficient manner.