RSS
people

Search engine friendly Asp.Net digg like numeric pagination with datalist, repeater & gridview.

Asp.Net Digg like pagination is available as a ready to use user control.

aspnet-digg-likepagination

This is a C# equivalent of the jQuery pagination control available here

I have created this control for Nestlé Family website. Its been used for a number of big websites. Checkout the following links to see live implementations
http://www.nestle-family.com/healthy-living/english/
http://www.nestle-family.com/our-kitchen/english/desserts/

The main feature of the control is its flexibility to use as a search engine friendly query string based pagination or  as a traditional post back based pagination using link buttons.

To use the control, simply set the Total Items Count and Current Page Index.

Click here to see the DEMO and DOWNLOAD the source

Visit above link to download full source with sample styles.

Available Options

The following list describes all the parameters available with the control:

1.    TotalItems
The total number of items that need to be paginated. (Required)

2.    PageSize
The number of items has to be shown per page. The total number of pages is calculated by dividing the TotalItems by PageSize. (Default: 10)

READ MORE »

2 Comments |

Why do you want a better data paging method with Asp.Net

This is the first of a series of articles am going to write about Asp.Net 2.0 pagination and how to build a custom digg like numeric pagination control which can be used with DataList, Repeater or any other data bound controls.

NOTE: I haven’t used the .Net 3.5 DataPager control yet, so am not sure if it already addressed the scenarios in the following discussion

The default pagination in Asp.net which comes with GridView is great in terms of developer productivity and ease of use. When use with data source controls it will work without even a single line of code and it is easy to customize by setting simple properties available.

But you may need to think about writing a your own pagination logic when

  1. You need pagination with Datalist or Repeater
  2. You need search engine friendly pagination
  3. You need user friendly pagination
  4. You need clean HTML for the pagination links
  5. You need a pagination strip which will work independent of data bound controls

READ MORE »

3 Comments | Tags: , , , , ,