Implementing a pager for asp.net's DataList/Repeater
        Posted  
        
            by emre
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by emre
        
        
        
        Published on 2010-05-30T21:46:37Z
        Indexed on 
            2010/05/30
            21:52 UTC
        
        
        Read the original article
        Hit count: 567
        
I have a DataList showing the results, and a Repeater that is supposed to be the pager. I decided to use the page number by redirecting with a QueryString parameter, so it will also be bookmarkable ... My problem is mainly in the UI actually.
If I put DIV's with their onclick calling a JS function that does window.location = url + pagenumber , then somehow I have to deal with QueryString operations via JS which is a bit messy.
If I use LinkButton objects within the ItemTemplate, then the Redirecting happens only when the linkbutton is clicked while whole div has cursor: pointer , you what I mean.
What would be the best approach to this? Thanks in advance.
Note: I really want to spend the time and effort implementing my own server-side paging. I think its more fun than reading 3rd party manuals.
© Stack Overflow or respective owner