How to make a paging?

Reply

Join Date: Feb 2007
Posts: 2
Reputation: erpasoleh is an unknown quantity at this point 
Solved Threads: 0
erpasoleh erpasoleh is offline Offline
Newbie Poster

How to make a paging?

 
0
  #1
Feb 12th, 2007
i'm have a problem about paging. example :



1 2 3 4 ...>>



hOw to make it!
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 79
Reputation: nikkiH is an unknown quantity at this point 
Solved Threads: 4
nikkiH's Avatar
nikkiH nikkiH is offline Offline
Junior Poster in Training

Re: How to make a paging?

 
0
  #2
Feb 13th, 2007
You make code to accept page number in the URL then use the links to pass the page number in the URL.
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 107
Reputation: madmital is an unknown quantity at this point 
Solved Threads: 3
madmital madmital is offline Offline
Junior Poster

Re: How to make a paging?

 
0
  #3
Feb 13th, 2007
Web Developer
When something seems too good to be true...it usually is
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 53
Reputation: Hellodear is an unknown quantity at this point 
Solved Threads: 0
Hellodear's Avatar
Hellodear Hellodear is offline Offline
Junior Poster in Training

Re: How to make a paging?

 
0
  #4
Feb 19th, 2007
That's pretty easy. You first use a Recordset, the you define the number of the records you want to be displayed per page, and you define the pageNumber you are in, and there you go. I would look like:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("datanase.mdb")' & ";" ' Accessset TheConnection = Server.CreateObject("ADODB.Connection")TheConnection.Open ConnectionStringSet RS = Server.CreateObject("ADODB.RECORDSET") RS.PageSize = 10 ' Or PageSize RS.CacheSize = PageSize RS.CursorLocation = adUseClient RS.Open "SELECT * FROM TABLE Where CONDITION_ETC;",TheConnection,3,3 CatEntries = RS_SHOW_ADS.RecordCount TotalPages = RS_SHOW_ADS.PageCount CurrentPage = CInt(Request("page")) RS.AbsolutePage = CurrentPage

Now you just need to show the data. When trying to switch between pages, remember to send along the CurrentPage-Variable. You can use the QueryString.

Good luck
Last edited by Hellodear; Feb 19th, 2007 at 9:05 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC