Results 1 to 2 of 2

Thread: displaying products doubt????

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Posts
    1

    displaying products doubt????

    I´m trying to build a shopping cart with ASP, I want display the name, the image and the priceof a products that belong to the same category.
    image1 image2 image3 image...
    name1 name 2 name 3 name....
    price1 price 2 price 3 price....

    mi doubt is how to build the html structure to show this
    I have the next code in my shopping cart:

    'Get the name of the image of all products in the category
    set rscatlist=db.execute("select name, productid,image from products where catcode=" & catcode & " order by name")
    %>
    <html>
    <head>
    <title> <%= shop %> </title>
    <body bgcolor="<%= bgcolor %>" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="<%= text %>" alink="<%= green %>" link="<%= bluel%>" vlink="<%= vlink %>"><font face="arial">
    <%
    header

    categorymenu
    %>
    <table>
    <td valign=top align=left> <font face="helvetica" size="3" color="<%= azul%>"><B><%= rscat("catname") %></B></font> <br> <%

    'show the products in the category
    if not rscatlist.eof then
    rscatlist.movefirst
    while not rscatlist.eof
    %> <font size="2" face="helvetica" color="<%= green %>"><td width=50> <a href="product.asp?productid=<%= rscatlist("productid")%>"><%=rscatlist("name")%><%=rscatlist("image")%></a> <br> <%
    rscatlist.movenext
    wend
    end if
    %>
    the question is:

    How I can show four products in one line, the next for in the next line and so on

    People in www.forosdelweb.com give me the next link http://forosdelweb.com/showthread.php?threadid=123630 , I get this answer (an example) there:

    <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <% counter=0 Do While Not Rs.EOF %> <td><%=Rs("fieldname")%></td> <% counter=counter+1 If counter Mod 4=0 Then Response.Write "</tr><tr>" Rs.MoveNext Loop %> </tr> </table>

    I,ve been trying to put this in my source code, but I

  2. #2
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Hi!

    I am developing a shopping cart as well! Thats why i wanted to know the RecordCount Thingy! Do you know how to use RecordCount in ASP ?

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

Posting Permissions

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



Click Here to Expand Forum to Full Width