A previous article on 4Guys, Paging through Records using a Stored Procedure by Daniel Anderson, provides one approach that far outperforms the default paging implementation.
However, it has a few areas that can be updated to improve the performance.
Following is the code for the feauture reciever which adds key values.
One generic way I generally prefer is; create a custom list. Read the custom list in feature acitvation event and add those values in the timerjob property bag.
In this way we can maintain config values to timer job without any changes to web.config just to read some key values.
Note, in the above example $key Column Internal Name value is ‘Title’. So, the CAML query variable $caml Query is constructed in that way.If you have different data type column which you want to use as a reference column, you have to change the variable accordingly as the column type.Hope you understand the usage of the above code for copying and replacing items from source list to destination list.For example, searching for "Microsoft" on Google returns approximately 2,190,000,000 results, but thankfully Google only shows me ten of those at a time. NET 2.0 providing two paging flavors: While default paging is quick and easy to implement, for sufficiently-sized result sets custom paging is a must.
When providing paging access to particularly large result sets - tables with tens of thousands, hundreds of thousands, or millions of records - care must be taken in querying the data such that only the particular page of data requested is returned. In March 2006 I authored a couple of articles here on 4Guys on how to efficiently page through large result sets using custom paging in the Grid View with the Object Data Source and SQL Server 2005's new keyword.If the item does not exist it will create a new item Following code copies/replace items from the list “Source List” to the list “Destination List”. The key reference column for both the list is ‘Title’ column.