title: Get current pageindex of gridview on button click
body: <p>I have a gridview with paging enabled. Also I have few button click events outside gridview and now I want to capture the pageindex eachtime before proceeding with events.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>protected void btnRecords_Click(object sender, EventArgs e)
      {
         //capture current pageindex of gridview
         //then proceed with event flow
      }    
  </code></pre>