title: asp.net how to remove all the rows from a table except the first one
body: <p>In the past i was using this</p>
  
  <pre><code>DateBookingTable.Rows.Clear();
  </code></pre>
  
  <p>To remove all the rows.</p>
  
  <p>Now I want to remove all the rows except the first one.</p>
  
  <h3>why I want that?</h3>
  
  <p>because when I remove all the rows, the <code>th</code> is removed, i don't want that. i want to remove all the data. not the <code>th</code></p>
  
  <p>this is what i don't want to remove </p>
  
  <pre><code>&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;PlanTime&lt;/th&gt;&lt;/tr&gt;
  </code></pre>
  
  <h3>what I have tried</h3>
  
  <p>I make this loop:</p>
  
  <pre><code>for (int i = 0; i &lt; DateBookingTable.Rows.Count; i++) { 
                  if (i &gt;0){
                  //here what should I do
                  }
              }
  </code></pre>
  
  <p>but I didn't know how to remove that row in the looop</p>