What logic?

P

Paulo

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
 
B

Bob Barrows [MVP]

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top