newbie with simple question...

Results 1 to 3 of 3

Thread: newbie with simple question...

  1. #1
    Daniel Guest

    Default newbie with simple question...

    I am very new to ASP and VBscript. I have a web photo gallery I&#039;m trying to do with a database. I have it working to the point that the user can select a category of pictures and my asp page comes up with the correct info from my database.<BR><BR>But, I have a next and previous button to cycle through the database results one at a time. They work fine until I select the previous buttons on the first image, or the next button on the last image.<BR><BR>I need to test if the user is clicking &#039;next&#039; on the page with the last image and direct them back to the category selection page. How can I code these buttons for this?

  2. #2
    Answer Guest

    Default RE: newbie with simple question...

    Using picRS as your recordset...<BR><BR><BR>&#039;For the end:<BR>picRS.MoveNext<BR>If Not picRS.EOF Then<BR>&#039;code for next button<BR>Else<BR>&#039;code for redirect to category selection<BR>End If<BR><BR>&#039;For the beginning<BR>picRS.MovePrevious<BR>If Not picRS.BOF Then<BR>&#039;code for Previous button<BR>picRS.MoveNext<BR>Else<BR>&#039;code for redirect to category selection<BR>End If<BR>

  3. #3
    Daniel Guest

    Default RE: newbie with simple question...

    Thanks...that helps!<BR><BR>This is so confusing though...I started this project letting UltraDev code the ASP for me, then decided I wanted to learn to code it manually, but trying to decifer the code that UltraDev writes is a nightmare. I&#039;m about ready to just start from scratch coding it all myself.<BR><BR>You&#039;ll probably see more of my questions on here in the next few days! Thanks for the quick response!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts