944,179 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1467
  • ASP RSS
Feb 12th, 2007
0

How to make a paging?

Expand Post »
i'm have a problem about paging. example :



1 2 3 4 ...>>



hOw to make it!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
erpasoleh is offline Offline
2 posts
since Feb 2007
Feb 13th, 2007
0

Re: How to make a paging?

You make code to accept page number in the URL then use the links to pass the page number in the URL.
Reputation Points: 13
Solved Threads: 4
Junior Poster in Training
nikkiH is offline Offline
79 posts
since Dec 2006
Feb 13th, 2007
0

Re: How to make a paging?

Reputation Points: 10
Solved Threads: 5
Junior Poster
madmital is offline Offline
119 posts
since Jun 2005
Feb 19th, 2007
0

Re: How to make a paging?

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.
Reputation Points: 11
Solved Threads: 0
Junior Poster in Training
Hellodear is offline Offline
53 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP: Sending a HTML form to an email address
Next Thread in ASP Forum Timeline: ASP or VBS + IIS6 log files





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC