I am trying to find a solution in asp.net in order to achieve paging of data so
1) Application does not have to connect to DB on each page index change, in order to retrieve either entire set or just a paged set of results
2) Do not want to store results in Viewstate or Session
For large result sets, I was thinking of storing key values (ID, rownumber) in a result set (array, json) and then populate additional row information on row binding.
Is there a way to do it in asp.net, or I need to consider jQuery for this scenario.
You need to cache your results. For example:
Example:
Caching Approach 1
Caching Approach 2
You could always cache your results in code:
Keep in mind that the returned object must to be a
DataSetorDataTablein order to add sorting capabilities to your cache resultsAgain you need to use cache
I don’t see how jQuery (by itself) can help you with your requirement, I mean if you use AJAX posts, you would improve the perceived performance of your current page, but that won’t help you with the connections to the database unless you use caching