Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 2nd, 2004, 11:14 PM
Authorized User
 
Join Date: Jan 2004
Location: Oklahoma City, , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I put this into a table?

What code do I use to make this show in a table?

Do While Not rsNews.EOF
    Response.Write ("<br>")
    Response.Write (rsNews("NewsInfo"))
    Response.Write ("<br>")
    Response.Write ("")
    rsNews.MoveNext
Loop

Thanks for your help!

  #2 (permalink)  
Old February 3rd, 2004, 12:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Response.Write ("<table>")

Do While Not rsNews.EOF
    Response.Write ("<tr>")
    Response.Write ("<td>")
    Response.Write ("<br>")
    Response.Write (rsNews("NewsInfo"))
    Response.Write ("<br>")
    Response.Write ("")
    Response.Write ("</td>")
    Response.Write ("</tr>")

    rsNews.MoveNext
Loop

Response.Write ("</table">)

---------------------------------------------

Since you are putting this in a table you don't really need the break rules but it will add more space. You can also put the horizontal rule in it's own row if you want by modifying the code a little.

Hope this helps.

J
  #3 (permalink)  
Old February 3rd, 2004, 12:50 AM
Authorized User
 
Join Date: Jan 2004
Location: Oklahoma City, , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That does help. Where would I put a second one...ex: NewsDate, or something...to show up on the next row or column?

  #4 (permalink)  
Old February 3rd, 2004, 07:52 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You need to specify each column you want to show from the row.

    Response.Write ("<td>" & rsNews("NewsInfo") & "</td>")
    Response.Write ("<td>" & rsNews("NewsDate") & "</td>")
    Response.Write ("<td>" & rsNews("<another column>") & "</td>")

Peter
------------------------------------------------------
Work smarter, not harder.


Similar Threads
Thread Thread Starter Forum Replies Last Post
out put cyber_kaley20 Beginning PHP 2 October 5th, 2008 07:46 PM
Quick question put image in table cell user0b PHP How-To 0 June 26th, 2008 10:56 PM
How can we put the Table in the center of browser nitinsuri1980 ASP.NET 1.0 and 1.1 Professional 1 April 2nd, 2006 04:09 AM
How can we put the Table in the center of browser? nitinsuri1980 ASP.NET 1.0 and 1.1 Basics 1 April 1st, 2006 10:00 PM
How to put a control inside a table cell? zach2004 ASP.NET 1.x and 2.0 Application Design 7 March 8th, 2004 03:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.