-
Help with displaying records from query
Hi,
I currently write the results from my queries in list view (ie, one row at a time) but I want to be able to write the results in grid view, (ie, 3 or four records in each row until results have ended)
So say if a query returned 10 results, I want to display the results as follows:
1 2 3
4 5 6
7 8 9
10
instead of:
1
2
3
4
5
6
7
8
9
10
Any help will be greatly appreciated.
Thanks,
Manny
-
-
Count the loops
What i usually do is declare a "dummy" variable and then count in the loop.
For example:
i = 1
<tr>
<% WHILE NOT objRS.EOF
i = 1 + i
Response.Write "<td>" & whatever & "</td>"
IF i = 4 THEN
Response.Write "<tr>"
i = 1
END IF
objRS.MoveNext
WEND
%>
</tr>
Hopefully this "logic" makes a little send and guides you in the right direction. Without seeing your actual code, I cant really say much more.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks