Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

ASP Iteration for a Web Page Carousel populated from a Database

Avatar of souldj
souldj asked on
ASP
3 Comments1 Solution369 ViewsLast Modified:
I have a carousel display on a web page that I want to have populated from a database but I do not know how to get it to choose 3 items per page of the carousel before moving to the next page.

This is the carousel in HTML

<div class="sliderBox">
          <a class="arrow" href="#"></a>
               <div class="carousel">
                      <ul class="list">
                        <li>
                          <div><img src="images/img1.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>17.99</strong> </li>
                        <li>
                          <div><img src="images/img2.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>13.99</strong> </li>
                        <li>
                          <div><img src="images/img3.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>25.99</strong> </li>
                      </ul>
                      <ul class="list">
                        <li>
                          <div><img src="images/img1.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>17.99</strong> </li>
                        <li>
                          <div><img src="images/img2.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>13.99</strong> </li>
                        <li>
                          <div><img src="images/img3.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>25.99</strong> </li>
                      </ul>
                      <ul class="list">
                        <li>
                          <div><img src="images/img1.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>17.99</strong> </li>
                        <li>
                          <div><img src="images/img2.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>13.99</strong> </li>
                        <li>
                          <div><img src="images/img3.gif" alt="" /></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font>25.99</strong> </li>
                      </ul>
                  </div>    
          <a class="arrowR" href="#"></a>
          <div class="clr"></div>
        </div>


I then thinned it down to put my ASP Code


<div class="sliderBox">
          <a class="arrow" href="#"></a>
               <div class="carousel">
             <%
             
Set objDB = Server.CreateObject("ADODB.Connection")
objDB.Open DB_CON

MySQL="Select * from products where displayincarousel=TRUE "


Set ObjRs=objDB.Execute(MySQL)

if objrs.eof then
' No images in the database for the carousel



else
%>

<%

Do While not Objrs.EOF

%>
 <ul class="list">
                        <li>
                          <div><a href="productdetails.asp?intProdID=<%=objrs("productid") %>&SubCatalogID=<%=objrs("subcatalogID") %>">
                      <img src="shopproductimages/<%=objrs("productImg") %>" alt="<%=objrs ("productName") %>" width="150" height="200" /></a></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font><%=objrs("productPrice") %></strong> </li>
                        <li>
                          <div><a href="productdetails.asp?intProdID=<%=objrs("productid") %>&SubCatalogID=<%=objrs("subcatalogID") %>">
                      <img src="shopproductimages/<%=objrs("productImg") %>" alt="<%=objrs ("productName") %>"  width=150  height="200" /></a></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font><%=objrs("productPrice") %></strong> </li>
                        <li>
                          <div><a href="productdetails.asp?intProdID=<%=objrs("productid") %>&SubCatalogID=<%=objrs("subcatalogID") %>">
                      <img src="shopproductimages/<%=objrs("productImg") %>" alt="<%=objrs ("productName") %>" width=150  height="200" /></a></div>
                          <small>Starting At</small> <strong><font color="green">=N=</font><%=objrs("productPrice") %></strong> </li>
                      </ul>





<%
Objrs.MoveNext
Loop




end if


objRS.close()
Set objRS = Nothing
             
              %>
                     
                   
                  </div>    
          <a class="arrowR" href="#"></a>
          <div class="clr"></div>
        </div>


But it displays 3 of the same products six times and not 3 products per page .

Please help.
ASKER CERTIFIED SOLUTION
Avatar of magadesign_sviluppo
magadesign_sviluppoFlag of Italy image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers