Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2005, 05:21 PM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Paging and session

Hi

I've got multiple records that are brought up to an asp page from a database. I've added paging - 1 record per page - but have a problem. I want to display the first record only with the link stating next if more than one record. Previous would only appear if if I click on next however, my first record displays next and if I click on it the same record is redisplayed.

Is there any way I can get the first page to display without previous appearing?

Any info gratefully received.
 
Old January 26th, 2005, 10:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

How are you implementing paging? Seeing code will help? Are you storing the paging information in the session or passing it along in the querystring?

Brian
 
Old January 26th, 2005, 10:46 AM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I'm passing it along as something like

response.write <a href="webpage1.asp?Page= & page">

resulting in http://webpage1.asp?Page = 1 where page is the first page. Page is a variable passed on a querystring.

When I click on originating page which brings up the record set, the url is http://webpage.asp?ID=12345 (numbers are unique id numbers as this is a site where you login) and first record is displayed but with a next news link above it but when I click on next news link it displays the same record but URL changes to

http://webpage1.asp?Page =1

What I want is the link to display next record but also to have the unique ID so it would be something like

http://webpage1.asp?ID =12345 Page 1

Is this possible?

Lindsey


 
Old January 26th, 2005, 04:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Yes, you have to manually add in the ID parameter back in to where you have paging, that's all. It's just doesn't get retained automatically. So where you implement paging, make sure the ID gets passed along also.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
DB recordset paging using ajax paging? kumiko Classic ASP Basics 0 May 26th, 2008 10:23 AM
How to allow paging in datalist? okboy SQL Server 2005 1 January 21st, 2007 10:08 PM
Paging fadyratl VB Databases Basics 0 December 27th, 2006 05:04 AM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.