title: How do I maintain the data in my gridview beyond postback?
body: <p>I'm writing an internal web application that is used to look up credit checks.  I'm using ASP.NET for this website.</p>
  
  <p>I have a SQL Query that I have to query the credit check database and it returns a datatable of results.  After the person clicks search, I run the query and bind the returned datatable to the Gridview every time the user clicks the search button.</p>
  
  <p>This works fine, and it populates my gridview like it should.</p>
  
  <p>How do I maintain the data that is bound to my gridview beyond postback?  For example, lets say a person clicks Page 2 of the paginated gridview... how do I keep from losing the data of the gridview during that postback?  </p>
  
  <p>Currently I am storing the datatable in session[] but I don't think I should be doing this, because the size of this table is very large (sometimes hundreds of thousands of results!)</p>
  
  <p>Do I need to re-query the database for each postback?  The query takes a decent bit and I'd rather not if I could help it.</p>
  
  <p>What is the common solution here?</p>