title: How to implement paging using a HTML table?
body: <p>I have an html table which i bind data dynamically on the server side in C#.. The problem is that I have a search button that calls a search on the DB(in a search method on the server side) based on the information from the client page. this search method loads the info from the DB and updates the html table(this is where the information is binded dynamically)  </p>
  
  <pre><code>for (int i = 0; i &lt; data.Count; i++)
  {   
    FirstCell.Controls.Add(lbl1);
  
    SecondCell.Controls.Add(lbl2);
  
    ThirdCell.Controls.Add(lbl3);      
    row.Cells.Add(FirstCell);
  
    row.Cells.Add(SecondCell);
  
    row.Cells.Add(ThirdCell);
  
    Table.Rows.Add(row);
  }
  </code></pre>
  
  <p>... and after this is done I store the loaded objects from the DB in a session variable like: Session{"data"]=data;</p>
  
  <p>my question is how do I display the html table with a certain number of records per page with the page's indexes at the bottom of the view page below the table? And as I iterate through the pages keep the data viewable and not lost? I am not trying to use ASP.net data controls!!!</p>