title: How to bind a Paginate button OnClick event in Datatable
body: <p>I'm using a <code>Datatable</code> to populate a large number of records in my web-site project. And due to the big number of data I don't want to load all the records, thus obviously I need to do it in a pagination manner.</p>
  
  <p>So, in my <code>Datatable</code> I want each page to display only 10 records, and then when the user clicks on paginate button "2,3,...." or when click on "Next" I want then to bind the click event to get the clicked page number and based on that display the next batch of records.</p>
  
  <p>I have this <code>query</code> which I will use in the <code>SQL Server</code> side to fetch the corresponding data:</p>
  
  <pre><code>SELECT * FROM TABLENAME ORDER BY INSERTED_TIMESTAMP OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;
  </code></pre>
  
  <p>I want the <code>offset</code> value to be changed as per the requested page number. The idea that crossed my mind is to get the clicked paginate <code>button</code> number and then multiply it by 10. </p>
  
  <p>So my question is how to do that and if if you have any other suggestions to approach that please suggest me</p>