I am using this Function for displaying data in datagridview using paging ,using this on page 1 I am getting Last 10 rows displayed properly ,but when I click on next button It should display next last 10 rows but it display top 10 rows on each next page ,I think their is mistake in my cmd2 query...
"Select TOP " + PageSize + " QID,Question,Opt1,Opt2,Opt3,Opt4,AnsOp,Marks from Questions " + "WHERE QID NOT IN " + "(Select TOP " + PreviouspageLimit + " QID from Questions ORDER BY QID DESC) ", con);