Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 July 29th, 2003, 03:42 PM
Authorized User
Join Date: Jul 2003
Location: Houston, Texas, USA.
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nvillare
Default Move Next, Previous, First and Last

I want to create a photo album of different pics. How would I go about displaying them in thumbnails and in large images with the option to move to the previous, next, first and last photo? Also, where would I store this photos? In a data base or number them?

Any help is greatly appreciated!!


Old August 1st, 2003, 04:21 PM
Authorized User
Join Date: Jul 2003
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ALoPresto

I would make a simple database table which has one field (photoNum or some such) and then on your asp page do something like this:

'Connect to SQL Server or Access

Response.write "<a href=""" & objRS("photoNum") & ".jpg""><img src=""" & objRS("photoNum") & ".jpg"" width=""50"" height=""50""></a>"

Response.write "<a href=""0.jpg"">First</a>"
Response.write "<a href=""" & objRS("photoNum") - 1 & ".jpg"">Prev</a>"
Response.write "<a href=""" & objRS("photoNum") + 1 & ".jpg"">Next</a>"
Response.write "<a href=""YOURMAX.jpg"">Last</a>"
You obviously have to add some kind of validation to make sure objRS("photoNum") - 1 isn't negative, etc. Hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get previous date? rupen Javascript How-To 1 June 26th, 2006 10:57 PM
Subtracting a value from a previous value Wes Access 8 March 29th, 2006 12:17 PM
Next and Previous buttons. g_vamsi_krish ASP.NET 1.x and 2.0 Application Design 1 January 19th, 2006 11:19 AM
move through a recordset with next and previous. peterB Access VBA 8 February 22nd, 2005 03:48 PM
Previous Control Name wscheiman Access VBA 3 November 8th, 2004 02:03 PM

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