Using Datapager in case of paged results
<p>Before I explain the problem, let me set the context. I have a stored procedure which returns me paged results. So if I mentioned the page number as 1, I get the first 10 records and if the page number is 2 I get the next 10 set of records and so on.</p>

<p>Now in my Asp.Net page I need to show 10 items at a time and I want the pagination to be in numbered style. The same like Google pagination.</p>

<p>The problem now is that, since I get only 10 records at a time from the DB, the numbers don't show up. I've come across a solution at: <a href="http://stackoverflow.com/questions/2447130/how-to-use-datapager-with-database-paged">How to use DataPager with Database Paged</a>, however since my total number of records can run into 100's or 1000's, running the loop for so long is again a performance issue.</p>

<p>It would be great if you can let me know how this issue can be fixed.</p>

<p>Thanks in advance.</p>
