Paging in DataList
page 1 of 1
Published: 17 Oct 2003
Unedited - Community Contributed
Today, we will learn how we can add the paging feature for the datalist. It should be noted that, like DataGrid, DataList does not support inbuilt paging mechanism. The essence of this article is how we make use of the object SqlDataAdapter. This object has a method called, Fill which is used to add or refresh the rows in a DataSet. Actually the method Fill is overloaded. We will be mainly concentrating the one which takes four arguments. The four arguments are DataSet, startRecord, maxRecords and the TableName. Second and third arguments are integer. Where as the TableName is the table name. So, if we say objDV.Fill(objDS, 0, 5, "sales"). The dataset will be filled with 5 records and the starting position will be from the first record. First, we are bringing the entire records from the table sales, and then we filter those with the help of startRecord and maxRecords. For our example, we will consider the table, Sales from the pubs database (SQL Server 2000).
by Jesudas Chinnathampi (Das)
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 46344/ 40

Paging in DataList

Written on: July 23rd, 2002.

In my previous article, we discussed how to Sort data in a Datalist. Today, we will learn how we can add the paging feature for the datalist. It should be noted that, like DataGrid, DataList does not support inbuilt paging mechanism. The essence of this article is how we make use of the object SqlDataAdapter. This object has a method called, Fill which is used to add or refresh the rows in a DataSet. Actually the method Fill is overloaded. We will be mainly concentrating the one which takes four arguments. The four arguments are DataSet, startRecord, maxRecords and the TableName. Second and third arguments are integer. Where as the TableName is the table name. So, if we say objDV.Fill(objDS, 0, 5, "sales") The dataset will be filled with 5 records and the starting position will be from the first record. First, we are bringing the entire records from the table sales, and then we filter those with the help of startRecord and maxRecords.

For our example, we will consider the table, Sales from the pubs database (SQL Server 2000).

Things that we will be learning in this article.
  1. How to populate a DataList?
  2. How to build the User Interface for Paging in a DataList?
  3. How to make user of the Fill method of SqlDataAdapter?
  4. An alternate solution for the Fill method!

Populating the DataList

For our example, we will take the table SALES in the PUBS Database. Since stored procedures are very much better than inline query, we use a stored procedure called, sp_das_sales_sel, which contains a single SQL statement. The SQL statement would be Select * from pubs.dbo.sales. And finally, we need to bind the DataView to the DataList web server control.

How to build the User Interface for Paging in a DataList?

Apart from the DataList web server control, we will provide user with four hyperlinks for navigation. When the user clicks on any othe four navigation links, we will invoke a server side method which will pulls out the proper records. We will also show the total number of records, total pages and the current page number.

Code for Navigation Links.
<table width=100% align="right">
        <td width=76% align=left>
        <asp:label ID="lblStatus"
        Font-Size="10pt" />

        <td width=6%>
        <a href="datalistpaging.aspx#this"

        <td width=6%>
        <a href="datalistpaging.aspx#this"

        <td width=6%>
        <a href="datalistpaging.aspx#this"

        <td width=6%>
        <a href="datalistpaging.aspx#this"
How it works?

Important Note: The name of the file that I have used in the href property is "datalistpaging.aspx". You should replace this with your aspx filename, unless you keep the filename as myself.

We have four hyperlinks for each navigation. On each of these, we have a OnServerClick event which will be fired immediately when the user clicks the link. For example, when the user click the link, <<, which is for the first page, the method ShowFirst will be invoked. All we have to do in the ShowFirst method is to set the current record position to zero. And ofcourse, we have to bind the datalist. Let us take a look at the methods, ShowFirst and DataBind.

ShowFirst and the DataBind method.
Public Sub ShowFirst(ByVal s As Object, ByVal e As EventArgs)
    intCurrIndex.Text = "0"
End Sub

Private Sub DataBind()
    Dim objConn As New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
    Dim objDA As New SqlDataAdapter("exec sp_das_sales_sel", objConn)
    Dim objDS As New DataSet()

    If Not Page.IsPostBack() Then
        intRecordCount.Text = CStr(objDS.Tables(0).Rows.Count)
        objDS = Nothing
        objDS = New DataSet()
    End If

    objDA.Fill (objDS, Cint(intCurrIndex.Text), CInt(intPageSize.Text), "Sales")

    dList.DataSource = objDS.Tables(0).DefaultView
End Sub

How it works?

In the ShowFirst method, we are setting the value of intCurrIndex.Text to be zero. intCurrIndex is a hidden label control which keeps track of the current record number. We also do have two more hidden label controls. They are intPageSize and intRecordCount.

In the method, DataBind you can see that, we get the total record count. We are storing this count in the hidden label web server control called, intRecordCount. Then we use the Fill method to retrieve the current page.

An alternate solution for the Fill method!

The major disadvantage of our logic is that, if we have 1000 records in the table, we are bringing all those to our ASPX pages. All we need is the records for our current page. This can be achived by modifying our stored procedure. We should have an identity column in our table. Then, we should pass the starting position and the number of records to be retrieved to the stored procedure. By this way, we will just be bringing in the needed records, which will decrease the network traffic and throughput time.

Sample output of our scenario

Paging in DataList - 25,698 bytes
Fig: Paging in DataList.

Test this Script

Download the code

Click here to download the ASPX page
Click here to download the Stored Procedure


Sorting in DataList


So, that is it. We have a datalist with paging mechanism. Also read my other article which explains adding the sort feature to a datalist.

Send your comments to

User Comments

Title: datalist paging   
Name: Kachhadiya ravi
Date: 2013-01-24 6:15:01 AM
good example fro datalist paging
Title: Comment   
Name: navneet
Date: 2013-01-21 5:44:54 AM
good one
Title: Datalist Paging   
Name: Abhijit Bera
Date: 2012-08-09 9:03:42 AM
post datalist numeric paging
Title: sdfsdf   
Name: sdfsdsdf
Date: 2012-05-09 3:30:44 AM
Title: Good Code for paging   
Name: Vipul Patel
Date: 2012-03-19 9:55:06 AM
Good paging code written by application
Title: Data list paging   
Name: Poonam
Date: 2012-02-29 9:32:42 AM
plz tell us C# code in paging.plzplz.
Title: Data List Paging   
Name: Allen
Date: 2011-12-20 12:02:34 PM
Outstanding on the code Sir

If possible, could you please send me the link for the coplete aspx page.

Title: Plz help   
Name: Qasim
Date: 2011-07-11 3:33:07 PM
very good help plz if u dontmind send me this example.Paging in DataList with aspx.vb file....plz
Title: Data list paging   
Name: Mohit chauhan
Date: 2011-02-20 4:04:28 AM
plz tell us C# code in paging
Title: Mr   
Name: Thirupathi reddy
Date: 2010-11-19 11:28:07 AM
good Article.
It helped me.

Title: thanks   
Name: Ashok Kumar
Date: 2010-08-06 11:11:38 PM
I thankful you if this code use in my project and sucessful
working in user reqiurement .So another time thanks Sir.
Title: paging   
Name: ravi
Date: 2010-07-28 3:49:16 AM
plz tell us C# code in paging
Title: link die   
Name: ngocnet
Date: 2010-05-07 12:07:51 AM
link die now sir! how i can download it?
Title: Thanks   
Name: loses
Date: 2010-04-11 4:44:04 AM
this really help me so much, thanks! This is a other way, everybody can reference to it (
Title: thanks   
Name: vinod agarwal
Date: 2010-03-27 6:22:17 AM
Plz covert this code into C# language.
Title: its nice   
Name: RAkesh Swami
Date: 2010-03-24 7:39:21 AM
this is in but i want this code in
please answer my query
Title: useful one   
Name: dimitree
Date: 2010-03-22 2:44:51 AM
useful one nice...
Title: Excellent...!   
Name: Shanu_Sudha
Date: 2010-02-24 6:24:16 AM
Thank you so much... Really works good.. Now only i've completed my task in efficient manner... Thanks to you..

Title: thanks   
Name: g
Date: 2010-02-24 6:13:05 AM
Title: Nice One   
Name: Obiora
Date: 2010-02-09 4:12:10 AM
Nice one dudes . keep it up. Solved my probs
Title: Additional Pages   
Name: Billy Wardrop
Date: 2009-07-20 9:20:03 AM

I've integrated this code into my website and it works great. I'm having a small problem though, I sometimes get additional pages with no data.

Has anyone else had this problem.


Title: Arvind   
Name: sharma
Date: 2009-07-07 3:20:13 AM
hi, this is arvind
Title: Fix the download links   
Name: Many thanks
Date: 2009-06-30 5:24:36 PM
can you fix the link to download the code and stored procedure
Title: Thanks!   
Name: milia1000
Date: 2009-06-09 8:54:18 AM
Really good. I didn't know nothing about fill with startRecord and maxRecords. Great, thanks a lot!
Title: its working....   
Name: Bharti
Date: 2009-05-15 3:18:51 AM
thnxxxxx solve my problem...
pls can u help me to do the same for a checkbox list..
Title: good post   
Name: Nisar
Date: 2009-05-02 3:54:30 PM
Its work for me, thanks
Title: Really great!   
Name: Hannah
Date: 2009-03-07 3:31:01 PM
This really helped me so much. Thanks!
Title: Good One   
Name: Mani
Date: 2009-02-19 7:15:53 AM
Good One
Title: good one but...   
Name: mushtaq
Date: 2009-02-16 3:20:07 AM
This is really a good one.. but my requirement is when ever i click textbox the datalist should b displayed.. i tried dis one but when ever i click tht its cuming but when i click the any of the paging symbols its getting hidden...
Title: Nice 1   
Name: Rajanell
Date: 2008-12-18 1:14:50 AM
This is great though written years back its still the best DataList Paging code iv seen, it just took me under 15min to understand and convert it in C#.

Thanks a lot
Title: I need displaying numbers in the pages   
Name: sangam
Date: 2008-12-10 6:45:31 AM
Hi, the solution works. But what I would like to have is display numbers 1,2,3,4,.. and let user click the page number and jump to the page when user clicks. Is there any way for this?
Title: Hi   
Name: Rupamati
Date: 2008-12-07 5:34:39 AM
Hi Boss....
Sorry by mistake I wrote Not Working
it's working properly !!!!!!!!!!!!!
Thanks Boss!!!
Title: Need Advice   
Name: Rakesh Singh
Date: 2008-11-19 5:02:51 AM
I want to do paging with datalist of control in the form of numerics like as 1 2 3 4 5 6 7 please send me the best way of implementation of this query
Title: Need advice   
Name: Mohit
Date: 2008-11-14 12:06:51 PM
A part from this I watn to add one dropdownlist in top of these grid. And the dropdownlist contains total numbers of pages. so in this case it contain 5 value in it. (1,2,3,4,5). user can select any page from the dropdownlist base on that selection grid will display that page. Example. if user select 5 in dropdown than it's display last page.

Please let me know the best way of the implementation
Title: Good   
Name: Rahul
Date: 2008-11-12 5:20:46 AM
Thank you very much.
Title: Excellent   
Name: Jaimie El Rohi
Date: 2008-10-31 1:12:04 PM
This is Excellent Work.It helped me a lot.
thanks once again.
Title: Thanks   
Name: Mohammad Abu awwad / Jordan / ITG company
Date: 2008-09-28 2:50:25 PM
Thanks very much
Title: datalist   
Name: mehul
Date: 2008-09-16 5:18:01 AM
we can not showing multiple records
Title: thanks   
Name: BR
Date: 2008-09-02 2:31:38 AM
Thanks Very Much!
Title: thanks a lot!   
Name: bluerose
Date: 2008-09-02 2:26:08 AM
It is very nice solution
Title: datalist paging in   
Name: ramesh
Date: 2008-07-04 9:36:08 AM
iam working with datalist control and
iam getting page numbers in datalist control pls help me
Title: Thanks Very Much!   
Name: WFL
Date: 2008-04-08 1:14:20 PM
I want to thank you Jesudas, this article was extremely helpful, and saved me a lot of headache and time.
Title: Nice Article   
Name: KarthiKeyan
Date: 2008-03-24 9:07:33 AM
Nice article helpful congrats
Title: Nice solution, only one bug is there   
Name: Abhishek Joshi
Date: 2008-03-18 6:30:44 AM
It is very nice solution.
The only bug is that when we click on Page-Next link
and if we click on and after coming to last page if we
still click then blank page occurs. In this case the last
page should remain.
Title: Good Article   
Name: KarthiKeyan
Date: 2008-03-18 5:51:30 AM
Good Article very Help Ful in my project.
Title: Excellent!   
Name: Rajesh
Date: 2008-03-13 6:24:44 AM
it is a very good article. It is a very good technique
Title: Paging in DataList   
Name: Althaf Moideen Konnola
Date: 2008-02-26 11:37:03 PM
That's very good code.
This helped me a lot.
Title: pagination in datalist   
Name: abhinav
Date: 2008-02-19 12:37:30 AM
Can u please help me to change the link btns to numeric.. like 1 2 3 4 5 6 7 ...
Title: paging in datalist   
Name: chirag gohel
Date: 2008-01-31 12:11:20 AM
good, i want insrt image in datalist, how i can do it?
Title: hello   
Name: pradeep
Date: 2008-01-18 5:21:55 AM
Very much Usefull..
Title: paging   
Name: Rupa
Date: 2007-12-18 8:03:19 AM
i have a question for u, i did paging in my application succesfully but i have a problem

i have 200 records, per page i kept 5 records, so i am getting 40 page numbers i.e(1 2 3 4 5 6 7 .....40), i want to restrict the page numbers to (1 2 3 4 5) then Clicking on the next i want to get (6 7 8 9 10) like that

please can u help me
Title: great   
Name: snehasis mishra
Date: 2007-12-05 2:11:26 AM
Ya,ofcourse it's a brilliant work but if they have done in c# and also the paging has done like 1,2,3.Then it might be much better.Still it's a marvolous work.
Title: Very Good   
Name: Ravindra Thakur
Date: 2007-09-12 3:13:01 AM
this is very good and working fine but rename the databind method with databind1 or another name and replace the name with use the databind method with new name. But leave dList.DataBind() as same.
Title: Datalist paging   
Name: Anderson Theobaldo
Date: 2007-08-01 3:22:27 PM
That's very good code.
This helped me a lot.
Title: Nice code   
Name: Helder Lima
Date: 2007-07-16 10:57:26 AM
Very good,

This code helped me a lot!

Thanks in advance,
Helder Lima
São Paulo - Brazil
Title: datalist Paging   
Name: Vivekk umar
Date: 2007-07-11 1:43:57 AM
it was really helpful...
i hav understood the concepts
Title: Datalist Paging   
Name: Sanjay Kadam
Date: 2007-05-17 5:51:28 AM
That's very good code.
This helped me a lot.
Title: Datalist paging   
Name: sarayu
Date: 2007-05-15 2:28:05 AM
how to do paging in datalist using page numbers like (1,2,3,4) in with code
Title: had to post 2   
Name: some one
Date: 2007-03-15 12:44:27 PM
ooh ... and he only published this in 2003, so I'm sure 4 years later he still checks it just so he can help 5% of the morons that can't get it to work.

lol ...
Title: had to post   
Name: some one
Date: 2007-03-15 12:42:17 PM
Why do people post their problems in User Comments?

lol it's so funny.

When 95% of the people can get it to work ... umm .. the problem is most likely you not the author's code.

He took the time to provide a working useful example, why don't you take the time to debug your errors and fix them yourself.

Get a clue.
Title: erro   
Name: sc
Date: 2007-02-25 6:23:38 PM
I keep getting this error:
Input string was not in a correct format.

on this row:
If CInt(intCurrIndex.Text) + 1 < CInt(intRecordCount.Text) Then
Title: Very nice   
Name: Vinod Kushwaha
Date: 2007-02-20 1:48:04 AM
This is very nice.
Title: nice   
Name: L RamaKrishna Yepuri
Date: 2007-02-19 5:08:18 AM
God to see it
Title: Error   
Name: Ramesh
Date: 2007-02-06 5:08:34 AM
Title: datalist   
Name: monawwar hussain
Date: 2007-02-02 11:50:29 PM
thank for this example really it solve my problem in just few minute.
Title: excellent   
Name: vineeta
Date: 2006-12-29 12:46:29 AM
this article is excellent.whole article is very clear and userfriendly
Title: Use ViewState instead of invisible controls   
Name: Dave Knipper
Date: 2006-12-28 3:58:29 PM
I posted a longer comment but I received an error, so here's a shorter one.

Replace invisible controls such as (Label)intCurrIndex with ViewState["intCurrIndex"] to remove overhead and clean up the code.

If people want my c# version using viewstate let me know and I'll post somewhere.
Title: Paging in DataList   
Name: Mr. Manoranjan Singh
Date: 2006-11-27 7:24:15 AM
This code for us very very useful.
Thanx a lot.
Title: Not getting result   
Name: Mohd. Faiz
Date: 2006-11-22 6:34:37 AM
I have used as per your refereced but i am not getting result. you can see at

after that i have used two link buttons but now same so please provide right guidance to me.
Title: THanks alot   
Name: Myo Aung
Date: 2006-11-08 6:30:26 AM
Very useful
Title: Paging In Datalist   
Name: Gopakumar
Date: 2006-10-09 6:39:48 AM
Very Good article, thanks a lot for this coding...
Title: very neice   
Name: Ghanshyam
Date: 2006-09-21 2:57:22 AM
this is very helpful for ASP.NET developer
Title: Thank You   
Name: David Mercer
Date: 2006-09-13 5:45:17 PM
I have been searching for this for quite some time. I found a lot of explanations but none worked. Yours was easy to understand and worked great. Thanks...
Title: fabulas   
Name: niranjan
Date: 2006-08-25 6:10:57 AM
thank u , that helped me alot
Title: thanks   
Name: Harish.G.M
Date: 2006-08-09 7:29:37 AM
thanks man this helped me a lot
Title: Thank you very much   
Name: ctavan_it@...
Date: 2006-08-07 6:29:09 AM
The article is very useful for me !!
Thank your ...
Title: Ur article is very nice   
Name: Nagendra
Date: 2006-08-02 11:06:10 AM
Your artice help me a lot and thanks to u and ur article.
Title: Nice   
Name: Kavitha
Date: 2006-07-27 6:17:48 AM
Thanks for the Simple Code
Title: Datalist pagin   
Name: Kaushal
Date: 2006-07-22 3:00:26 AM
its gud .
but could u plz post full procedure code.
Title: Nice   
Name: kataria Bipin
Date: 2006-07-17 1:25:51 AM
than's for making this type of good code.
Title: Good article   
Name: Bob Smith
Date: 2006-07-10 5:04:15 PM
Good article, thanks.
Title: Passing Parameters into procedure   
Name: gym
Date: 2006-07-03 3:56:44 PM
Excellent article-
I am trying to pass a value into my stored procedure. The first time that the page loads I can see the first set of records, but when I press the next link, i see the error that my stored procedure is expecting the parameter. It looks like it is not storing the parameter that was passed in in the dataset. Please help. How do I do this?
Title: Really..........   
Name: Anubhav Singh
Date: 2006-06-24 9:27:37 AM
Its so helpfull for paging in datalist.
Title: very helpful   
Name: Ranjeet
Date: 2006-06-07 3:43:55 AM
This is very helpful for me. this absolutely nice
Title: Very good   
Name: Vijay Kumar Bandari
Date: 2006-05-30 1:47:34 PM
Hi Das,

This article helped me alot and i learned a new feature..
thanks alot
Title: Thanks   
Name: Rick
Date: 2006-05-09 11:08:41 AM
Great article, very simple compared to some other methods and more efective.
Title: gr8 job!!   
Name: Rajesh
Date: 2006-05-05 5:43:23 AM
This article is very helpful, again thanks alot!!
Title: thanx bro   
Name: Alex
Date: 2006-04-19 4:43:31 AM
Thank you, this really helped me.
Title: Sometimes an Extra Page   
Name: Kevin M
Date: 2006-04-02 9:46:23 AM
I have pagesize set to 20 yet on some records I get an extra page (blank) even though the 'Total Records' is always correct.
I don't understand why it does it some times.
On one page which has 6 recors then '1 of 1' is shown correctly BUT on another page that has 11 records then it shows '1 of 2' when there is clearly only one page.

Amy ideas?

Also, how do you make the 'first' amd 'last' navigation links invisible/disabled when you are on the first or last page.

Title: C# Version - Again   
Name: Darryl Wright
Date: 2006-03-29 3:31:01 AM
I see there are numerous people who are looking for a C# version of this amazing paging mechanism for the Datalist Web Control. I see too that someone
Name: Mark
Date: 1/12/2005 6:14:41 PM
Comment:I converted to C# cant post? must not allow HTML etc

Does anyone know where this C# code can be found?
Title: numeric like 1 2 3 4 5   
Name: Kanchi
Date: 2006-03-06 10:37:02 PM
Can u please help me to change the link btns to numeric.. like 1 2 3 4

Title: version in c#   
Name: christian
Date: 2006-03-02 3:28:59 AM
Good day....
its very helpful to me...but i just want to know if there is a version for c#..thanks
Title: Have method Problem   
Name: Dave
Date: 2006-02-13 12:49:37 AM
I have not been able to get the code running in ASP.Net 2.0 The error is "DataBind() shadows an overrideable method in the class control.." The page loads but the data is not presented. Any help would be appreciated.
Title: I have a question please   
Name: Elnahrawi
Date: 2006-02-04 9:36:56 AM
Thank you

I have a question about this article

How can i use this way to paging the datalist but with using a "HyperLink" controls instead of "ButtonLinks" cuz the search engains can't read the java links and it dosent access the other pages

if you need a live example you can visit my wibsite
and see what i mean

Thanks in advance
Title: Great   
Name: John S.
Date: 2006-01-16 11:01:52 AM
Thanks for this! Simple but effective.
Title: Mr   
Name: Welker
Date: 2006-01-05 5:06:06 AM
Thanks !
Title: about datagrid pagging   
Name: Rakesh Lal Dewangan
Date: 2006-01-05 2:10:27 AM
a lot ,
I have used this code ,my page is properly working .

Rakesh Lal Dewangan
Title: Helpful   
Name: Nirmal
Date: 2005-12-06 5:36:25 AM
Thanks, That helped a lot.
Title: Excellent   
Name: Sajjad
Date: 2005-11-20 3:13:54 AM
This is Excellent,solvedmy problem
Title: Thanx   
Name: Jikku
Date: 2005-09-26 2:02:14 AM

It helped me lot!!!

Title: paging with datalist   
Name: abhishek sachan
Date: 2005-08-10 4:30:12 AM
good logic,help me alot
thank you
Title: short and sweet   
Name: kavita singh
Date: 2005-07-20 12:10:32 AM
thanks a lot i found this code at the right time when i needed it.
Title: Fine Article   
Name: P.Suresh
Date: 2005-07-04 1:30:53 AM
It is is very nice.Even if we pass the starting position and the number of records to be retrieved to the stored procedure , how we retrieve those records through query.Plz send the stored procedure.
I have a small requirement.
I want the data in the table like this
store Id :7877
Order No :ord1111
qty :344
store Id :45545
Order No :oed333
qty :555
with paging. Is datalist solves my problem.if you know how plz mail me at
Title: good boy   
Name: kamran
Date: 2005-06-23 10:47:34 AM
it's a kind of nice code, thanks alot
Title: It realy nice   
Name: Vineet Kaushik
Date: 2005-06-16 9:08:59 AM
It's realy help me.
Thanks thanks alot.
Title: need clarification   
Name: nag
Date: 2005-06-07 2:40:22 AM
can we have numeric paging like 1 2 3 4 5...
if yes,do u have the code for that....
Title: Brilliant Work   
Name: Aman
Date: 2005-05-14 5:02:19 AM
Its marvellous.We r highly thankful to u.
Title: postback   
Name: freggel
Date: 2005-04-21 8:47:59 AM
my intCurrentIndex is always reset to zero with a postback and because of this the previous and next (buttons) doesnt work, does anyone know a good solution for this issue.

Title: Paging   
Name: bikash
Date: 2005-04-15 10:44:06 PM
Good one.More helpfull
Title: Yikes...   
Name: Dot net
Date: 2005-04-13 11:11:10 AM
This is a very slow method of doing it... if you have 1,000,000 records it will query all 1,000,000 records each time you switch pages... May i recommend using a paged stored procedure... it will be 100x faster.
Title: Thanx   
Name: Swarup Kumar
Date: 2005-04-09 7:48:01 PM
Thank you so much for helping the developer community by sharing the knowledge. I have implemented paging in datalist successfully by getting the help from your article.

Swarup Kumar
Title: hsms   
Name: hsms
Date: 2005-04-08 9:27:59 AM
We implemented the script provided by you on one of our project but we are facing a problem and need your help for the same, the prolem is as follows:

The next button doesnt seem to work properly say we have 7 records and we set paging to 5, it shows Showing 1 of 2 which is correct but again when we click the next button it displays showing 2 of 2 but if now we again click the next button it says showing 3 of 2 which isnt correct coz there arent any more records and as such a blank page is displayed.

we are sending you the code we are using
Title: good code   
Name: rupesh
Date: 2005-04-07 12:41:38 AM
good code working properly but how will i be able to do paging in numeric mode like 12345 next 5 etc
Title: tq   
Name: sista
Date: 2005-03-25 10:43:21 AM
works fine, thanks :)
Title: Excellent   
Name: Ravi
Date: 2005-03-16 11:09:50 AM
This is one of the methods to cheat Microsoft!!.. Excellent work.. U got good logic
Title: developer   
Name: mohamed ali
Date: 2005-03-05 4:26:32 PM
it is really helpful
Title: feedback   
Name: hazri
Date: 2005-02-05 3:24:20 AM
Wow its nice... but how to make button navigation like yahoo search result. I mean in that button use number, not arrow. If have 5 page show 1 2 3 4 5
Title: Using footer   
Name: xxx
Date: 2005-01-28 10:19:06 AM
Is it possible to place the navigation and Total Records in the footer of the datalist?
Title: I coverted to C# Version   
Name: Mark
Date: 2005-01-12 6:14:41 PM
I converted to C#, cant post? must not allow HTML etc

sent to das maybe he can
Title: just cool   
Name: Vidyadhar
Date: 2004-12-24 2:13:07 AM
its very beautifully.
Title: Good   
Name: Seyed Amin Pouriyeh
Date: 2004-12-15 12:53:20 AM
Thanks Dear,
Title: Suggestion   
Name: Sravya
Date: 2004-11-27 12:40:00 AM

It is ok, but if you give full code it will helpful more to users. i mean giving code for each and evey button clearly, explaining the purpose of each code. where you use that hiddden buttons, how to display total record numbers etc.,

Thanking you
Title: Nice but what about Sorting And Paging Simeltanously !!!!!!!!   
Name: Mahsa
Date: 2004-11-02 2:38:50 PM
we can not reserve our sort in this way during the postback
of pages,what is the solution then?

Again Nice Work
Title: very useful   
Name: me
Date: 2004-08-31 4:06:12 AM
this article is very useful.
Title: not work if put before datalist   
Name: Jammy
Date: 2004-08-25 11:42:14 AM
Look this code is fine but it not work if u put the
<< < > >> before the datalist .
Title: Thanks a bunch!   
Name: Nicholas Ho
Date: 2004-08-22 4:36:37 AM
Just want to say thanks for writing this extremely helpful article. I have been searching everywhere for weeks and your article has got be the best.

Love your work,

Title: Excellent   
Name: Davut Engin
Date: 2004-08-21 12:14:25 PM
Thank you for your clever help to DataList users :)
Title: This is not woking out   
Name: Manish
Date: 2004-08-05 4:55:25 PM
The code in this article is not working out. Plz check it out again.
Title: good   
Name: rajarajan
Date: 2004-08-05 7:18:25 AM
its really helped me
Title: Very Nice   
Name: Jerome Lavoie
Date: 2004-08-03 11:00:43 AM
Thanks, that helped a lot

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-23 1:48:44 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search