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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table For an asp page

Status
Not open for further replies.

B1naryPro

IS-IT--Management
Jan 20, 2002
114
US
I would like to have these recordset in different columns in a table. Any help greatly appreciated.
Here is the code:
Response.Write &quot;<Table>&quot;

While not caors.eof
Response.Write &quot;<tr><td>&quot; & (caoRs.Fields.item(&quot;Problem&quot;)) & &quot;</tr></td>&quot; & &quot;<br>&quot;
Response.Write &quot;<td><td>&quot; & (caors.Fields.item(&quot;problemdesc1&quot;))& &quot;</tr></td>&quot;
Caors.movenext
response.write &quot;</table>&quot;
Wend


JPBinary
MCSE, MCSA
 
Hi Mr. Binary!

Try:

Code:
'Open the table:
Response.Write &quot;<Table>&quot;

While not caors.eof

   'Write a row with two columns:
   Response.Write &quot;<tr><td>&quot; & (caoRs.Fields.item(&quot;Problem&quot;)) & &quot;</td><td>&quot; & (caors.Fields.item(&quot;problemdesc1&quot;))& &quot;</td></tr>&quot; 

   'Move to next record:
   Caors.movenext
Wend

'Close the table:
response.write &quot;</table>&quot;

That'll do it...

Dave Mc Donald
 
If I understood you correctly, you want &quot;Problem&quot; and &quot;problemdesc1&quot; fields of a recordset to be displayed in different columns, side by side in your table. There should be a small correction to your code:

<%
Response.Write &quot;<table>&quot;

While not caors.eof
Response.Write &quot;<tr><td>&quot; & (caoRs.Fields.item(&quot;Problem&quot;)) & &quot;</td></tr>&quot;
Response.Write &quot;<tr><td>&quot; & (caors.Fields.item(&quot;problemdesc1&quot;))& &quot;</td></tr>&quot;
Caors.movenext
Wend

Response.write &quot;</table>&quot;
%>

 
Sorry but that code didn't work. I wanted side by side but it put the fields on top of each other.

Format to be

Firstname Lastname
Jimmy Smith

Thanks for the help

JPBinary
MCSE, MCSA
 
Sorry, you are right. See davemcdonaldireland's post, he's got it right. And her is corrected code.

<%
Response.Write &quot;<table>&quot;

While not caors.eof
Response.Write &quot;<tr><td>&quot; & (caoRs.Fields.item(&quot;Problem&quot;)) & &quot;</td>&quot;
Response.Write &quot;<td>&quot; & (caors.Fields.item(&quot;problemdesc1&quot;))& &quot;</td></tr>&quot;
Caors.movenext
Wend

Response.write &quot;</table>&quot;
%>
 
thanks that did the trick

JPBinary
MCSE, MCSA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top