title: Break in classic ASP page
body: <p>I'm working on a webpage where it gets its data from a SQL database. And I want to break the records so that when it reaches the third row, it will break to another page. 
  I have a javacript in order for it to break page. However, this records are displayed in a table. And I don't know how to place  in the code. Any suggestion? 
  Thanks.</p>
  
  <p><code>&lt;style&gt;div.break {page-break-before:always}&lt;/style&gt;</code></p>
  
  <pre><code>Sub DisplayRecords()
      Do until registerRS.eof
          counter=counter+1
          if counter=41 then
              counter=0
              counter=counter+1
          end if
          r = r + 1
          If r = 1 then
              Response.write "&lt;tr&gt;"
          End if
          %&gt;
      &lt;td&gt;
      &lt;%=registerRS.Fields("SchoolId")%&gt; &lt;br /&gt;
      Class: &lt;%=registerRS.Fields("class")%&gt;&lt;br /&gt;
      &lt;/td&gt;   
          &lt;%
          If r = 2 then
              Response.write "&lt;/tr&gt;"
          End if
  
          If r = 3 then r = 1
          registerRS.movenext
      loop
      registerRS.close
      set registerRS=nothing 
  End sub
  </code></pre>