SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Looping

  1. #1
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Looping

    Hi guys, this is my first message. I need help regarding asp classic looping code.

    I want to loop 3 rows per table



    DESCRIPTION QTY WEIGHT DESCRIPTION QTY WEIGHT
    A 2 2 D 5 5
    B 3 3 E 6 6
    C 4 4 F 7 7

    Thanks in advance

  2. #2
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    689
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are several ways to loop, see here for more description:

    http://webcheatsheet.com/asp/loops.php

  3. #3
    SitePoint Member clumbiecom's Avatar
    Join Date
    Feb 2011
    Location
    CLUMBiE.com
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use this code vbscript

    <%@ language="vbscript" %>
    <%

    response.write("<table border=1 width=50%")

    For a = 1 to 3 'this is the your value
    response.write("<tr>")
    response.write("<td>" & a & "</td>")

    For b = 1 to 6 ' loop
    response.write("<td>" & a * b & "</td>")
    Next 'move on to the next value of b

    response.write("</tr>")
    Next 'repeat the code

    response.write("</table>")
    %>

    good luck and happy coding


Bookmarks

Posting Permissions

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