Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Multiple Pages Dynamically

Status
Not open for further replies.

bobbyr

Programmer
Nov 30, 2000
66
US
I'm creating a page that displays photos and their caption on a page. I would like to limit the number of photos to 5 per page, then if there is more than 5 photos, create a Page 2, Page 3... link at the bottom. Any help (or links that would help) would be greatly appreciated.

Bobby R
 
Presumably, you are reading the info from a database??

You can select multiples of 5 records at a time, by passing arguments to each page. (EG if you pass the ID of the last record displayed on one page to the next, you can do a "SELECT TOP 5 * FROM Table_Name WHERE ID > id_variable ORDER BY ID ASC" to return the next 5 record).

If you want a more detailed answer, let me know and I will post some code.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top