Pager Control for ASP.NET

Paging is an important thing that every web developer should know about. In ASP.NET 1.1 and 2.0, just DataGrid and GridView has built-in support for paging, and for somebody who prefers Repeater or DataList to DataGrid or GridView (like me!), it is so painful to implement paging. And as a developer, it was very painful for me. So I decided to write a pager control to simplify this problem on my web applications in a developer friendly way. First, I implemented a version of the Pager control last year. It came with some cool features, but also had two major weaknesses.

  1. It wasn't suitable for more than 20 pages.
  2. It used querystring to get the current pPage index, and it was annoying somehow.

and hopefully the presented version has fixed both of the above issues.

  1. It has the ability to handle large size pages with something I called Smart Shortcuts, they are really cool and are shown in figure-1 in gray background cells.
  2. The generated hyperlinks do more than a simple hyperlink. they cause a postback to the server, so no more query string parameter will be needed.

Read more...

 

No Comments