Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 11th, 2008, 08:55 PM
Paulo
Guest
 
Posts: n/a
Default What logic?

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
Default 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"


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles