title: How do I maintain data from a datatable after postback?
body: <p>I created an application that grabs jokes from a database on start and shows the first joke on screen. Now when we hit the Next button it should show the second joke. When I first grab the jokes, I put them in a globally declared datatable. To show the first joke I'm doing:</p>
  
  <pre><code>Title.Value = dt.Rows[0]["joke_title"].ToString();
  Detail.Value = dt.Rows[0]["joke_content"].ToString();
  </code></pre>
  
  <p>Now when I hit Next button I'm running these commands:</p>
  
  <pre><code>Title.Value = dt.Rows[0+1]["joke_title"].ToString();
  Detail.Value = dt.Rows[0+1]["joke_content"].ToString();
  </code></pre>
  
  <p>but when the Next button is hit, the page posts back and I lose the values in datatable. How do I solve the error without losing the data in the datatable?</p>