Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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!

Reply With Quote
  #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
Reply With Quote
  #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?

Reply With Quote
  #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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:01 AM.


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