Things would be so much easier if you used the built-in controls. :) DataPager Class (System.Web.UI.WebControls) | Microsoft Docs[^] ListView Class (System.Web.UI.WebControls) | Microsoft Docs[^] If you want to continue with your custom paging, you'll need to modify your doPaging method to only add rows for the page numbers you want to display.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer