
|
Displaying Results Vertically and Horizontally By 15 Seconds Discussion List |
Rating: 2.6 out of 5 Rate this article
|
email this article to a colleague
suggest an article
|
Question
I am trying to write out the results of a stored procedure in an HTML table, which takes the following format:
-----------------
A F K
B G L
C H M
D I N
E J O
------------------
Where each letter needs to sit in its own cell in the table. I'm finding it very difficult as HTML tables need to be written out horizontally then vertically. The only way I can think of doing it is to write each column as its own table, but I really need all results to sit in the same table for layout purposes.
Any ideas?
-Andrew
Rob says
use GETROWS() to convert to an array and the rest can be done with simple logic and a bit of math. like, across the top will be every 6th row...
<tr>
<td><%=aryData(colNum,x)%></td>
<td><%=aryData(colNum,x+6)%></td>
<td><%=aryData(colNum,x+12)%></td><td>
</tr>
I'm sure you get the idea..and will hopefully improve upon that..very basic idea.
David says
I thought it would be cool to make a subroutine to do this *automagically* based on how many columns you wanted to see, so you could change it whenever you wanted to. Omits blank trailing columns (unless over-ridden: see code for explanation)
Rob, you want to put this in your site somewhere?
' assume allData is a valid GetRows array
For TableColumns = 1 to 5
OutputVerticalDbTable allData, TableColumns, 0
Next
Response.End
Rob says
TEMPORARILY:
http://www.aspfree.com/devlinks/snippets/OutputVerticalDbTable.html
will fix it up later tonight ...giving proper credits of course.
This conversation string was taken from the 15Seconds ASP Listserv on 1/18/01. If you have an ASP-related question or would like to share some of your knowledge with others, you may join the list by clicking here.
|
|
|
|
|
Supporting Products/Tools
|
|
|
CustomError 2.0 for IIS
|
|
When errors occur on a Web site, they should be handled in a way that helps the user to get back on track. Unfortunately, setting up customized error pages in IIS usually requires something many Web developers lack -- access to and familiarity with the Web server's administrative interface. With CustomError for IIS, developers can add error pages, coded by hand or created in their favorite editor, by simply uploading them to a designated directory. No administrator intervention is required.
|
[Top]
|
|
|
|
Other Articles
|
|
|
|
|
|
|
Jun 21, 2004 - Using Open Source .NET Tools for Sophisticated Builds
|
|
|
Building an application can be more than pressing F5. With an increasing
number of quality packages being released, developers for the .NET platform now have options to create a very sophisticated build process. Aaron Junod describes a sample build environment and shows how a number of tools can work together to make reliable, predictable, and value-added builds.
[Read This Article] [Top]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Apr 18, 2001 - Error Reporting - IIS 5.0
|
|
|
The script in Mark Newlands' article this week handles how errors are displayed and logged. It can capture all values in use at the time (e.g. form, querystring, session,and application level) and records them if you set a Boolean value to do so - displays custom HTML if required. Sends email, logs to database, and/or text file.
[Read This Article] [Top]
|
|
|
|
|
Mailing List
Want to receive email when the next article is published? Just Click Here to sign up.
|
|