How to page through large volume of data?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndrewK
    New Member
    • Dec 2008
    • 16

    How to page through large volume of data?

    I'm creating a web page that will show a form that allows a user to query a database and then page backwards and forwards through the data. In other words one record of the returned data will be displayed on the form and the user can move forward to display the next record or back to display the previous one.
    My problem is that a large volume of data may be returned and I'm wondering the best way to keep this data between postbacks. I would think there would be too much data to use viewstate.
    Has anyone got any ideas for the best way to accomplish this please?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You could store the data in ASP.NET Cache or Session. You could consider storing it in ViewState but since it's a large amount of data I wouldn't recommend it.

    If the data should be available to more than one person, Cache is probably your best bet.

    -Frinny

    Comment

    • aspdotnetuser
      New Member
      • Nov 2010
      • 22

      #3
      Here's a solution..a bit complicated but gives you a performance profit

      Use limit in your query to fetch only limited records and keep it in your session variable. once you reach the exhaustion limit on either side (say 10 in <next> or 1 in <prev>), then query the next 10 records.

      So user will have only the limit of records in session to view and querying the whole load information is avoided

      Comment

      Working...