What logic?

Discussion in 'ASP General' started by Paulo, Aug 11, 2008.

  1. Paulo

    Paulo Guest

    Can you help building it?

    Dim Desc(50)
    Desc(1) = "Tela1"
    Desc(2) = "Tela2"
    Desc(3) = "Tela3"
    Desc(4) = "Tela4"
    ....
    ....
    etc

    Supose I have a total of 13 records: Desc(13) = "Tela13", how do I list it
    below using 4 columns per lines on asp?

    <table border="0">
    <% Here will be some ForLoop for <tr> %>
    <tr>
    <% Here will be some ForLoop for <td> %>
    <td>Desc(1)</td><td>Desc(2)</td><td>Desc(3)</td><td>Desc(4)</td>
    </tr>
    <tr>
    <td>Desc(5)</td><td>Desc(6)</td><td>Desc(7)</td><td>Desc(8)</td>
    </tr>
    ... ... ...
    </table>

    Can you help me on logic/math loop ?

    Many thanks
     
    Paulo, Aug 11, 2008
    #1
    1. Advertising

  2. Basically, it's

    for i = 1 to ubound(desc) step 4
    response.write "<tr>"
    for j = 0 to 3
    response.write "<td>"
    if not i+j > ubound(desc) then
    response.write desc(i + j)
    end if
    response.write "</td>"
    next
    response.write "</tr>"
    next

    Paulo wrote:
    > Can you help building it?
    >
    > Dim Desc(50)
    > Desc(1) = "Tela1"
    > Desc(2) = "Tela2"
    > Desc(3) = "Tela3"
    > Desc(4) = "Tela4"
    > ...
    > ...
    > etc
    >
    > Supose I have a total of 13 records: Desc(13) = "Tela13", how do I
    > list it below using 4 columns per lines on asp?
    >
    > <table border="0">
    > <% Here will be some ForLoop for <tr> %>
    > <tr>
    > <% Here will be some ForLoop for <td> %>
    > <td>Desc(1)</td><td>Desc(2)</td><td>Desc(3)</td><td>Desc(4)</td>
    > </tr>
    > <tr>
    > <td>Desc(5)</td><td>Desc(6)</td><td>Desc(7)</td><td>Desc(8)</td>
    > </tr>
    > ... ... ...
    > </table>
    >
    > Can you help me on logic/math loop ?
    >
    > Many thanks


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Aug 11, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Qunwei Chen
    Replies:
    6
    Views:
    3,640
    Renaud Pacalet
    Aug 22, 2003
  2. RZ
    Replies:
    2
    Views:
    511
  3. Cliff Cummings

    SystemVerilog: "logic" or "ulogic?"

    Cliff Cummings, Sep 16, 2003, in forum: VHDL
    Replies:
    7
    Views:
    4,136
    cc0139808
    Sep 20, 2003
  4. Richard B. Katz
    Replies:
    0
    Views:
    691
    Richard B. Katz
    Dec 4, 2003
  5. spike
    Replies:
    8
    Views:
    1,473
    Steve Holden
    Feb 9, 2010
Loading...

Share This Page