Generating pagination links
        Posted  
        
            by alpheus
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by alpheus
        
        
        
        Published on 2010-05-27T18:39:41Z
        Indexed on 
            2010/05/27
            23:31 UTC
        
        
        Read the original article
        Hit count: 238
        
I am trying to implement a paging system that displays nearby page numbers as well as pages at each extreme. For example, if the user is on page 20 of 40, the following links should be displayed: 1, 2 ... 18, 19, [20], 21, 22 ... 39, 40. The solution would be similar to the one described here:
http://90poe.com/alex-lee-on-bell-curve-pagination
I have seen code to do this in PHP, but not in ASP.net (ideally I am looking for C# code). If anyone has done anything like this previously, it would be very helpful to see your code.
© Stack Overflow or respective owner