Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paged-formated asp output table

Status
Not open for further replies.

gasca

Programmer
Apr 2, 2003
22
ES
I want to format the output of a database query in a 2-columns table, that is:

Record1 Record5
Record2 Record6
Record3 Record7
Record4 Record8

Looking to some articles in 4Guys and 101Asp they show some techniques like GetStrings and GetRows but they aren't useful because they get all the records of the database and I'm trying to do a paged search, and those methods don't admit properties like AbsolutePage (if I'm not wrong).

I will always be able to use RecordSet.Move onwards and backwards to write the needed record but this is quite unefficient all time moving the cursor.

Is it possible to make this?

Thanks.
 
yes it's possible, but all you ned to do is format the <table> to come out that way

for example creating the way you want the output in straight HTML before hand would give youa step ahead of getting the ASP to generate the same view

so you want
<html>
<body>
<table>
<tr>
<td>

<table>
<tr>
<td>Record1</td>
</tr>
<tr>
<td>Record2</td>
</tr>
<tr>
<td>Record3</td>
</tr>
<tr>
<td>Record4</td>
</tr>
</table>

</td>
<td>

<table>
<tr>
<td>Record5</td>
</tr>
<tr>
<td>Record6</td>
</tr>
<tr>
<td>Record7</td>
</tr>
<tr>
<td>Record8</td>
</tr>
</table>

</td>
</tr>
</table>
</body>
</html>

now all you have to do is set a few counters to catch the spot to cut off the column (</td>) at 4 rows so you start another column.

this is all formatting HTML and really shouldn't be done in ASP methods. That would be a waiste of server time. trust me!

___________________________________________________________________
onpnt2.gif
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top