Connecting Tech Pros Worldwide Help | Site Map

What logic?

  #1  
Old August 11th, 2008, 08:55 PM
Paulo
Guest
 
Posts: n/a
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


  #2  
Old August 11th, 2008, 09:45 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a

re: What logic?


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:
Quote:
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"


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How do web templates separate content and logic? bruno.desthuilliers@gmail.com answers 15 July 3rd, 2008 08:45 PM
Data Layer, Business logic layer help SAL answers 9 January 14th, 2008 02:35 AM
Moving server side logic to javascript.. rabbitrun@gmail.com answers 14 February 13th, 2007 04:45 AM
Catalyst release low cost logic processing tool fiona@catalyst.com answers 0 September 8th, 2006 04:45 PM
Using MABLE logic engine with existing .NET applications. Al Fatykhov answers 0 February 14th, 2006 01:15 PM