Results 1 to 2 of 2

Thread: ASP Tables

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    153

    HTML Table

    Don't have a clue on how to go about creating this loop using an HTML Table. An example using code would be very helpful. Thanks!

  2. #2
    Hyperactive Member compuGEEK's Avatar
    Join Date
    May 1999
    Location
    Mpls,MN,USA
    Posts
    281
    A Stored Procedure would probably give you the best performance.

    I'm using a webclass, and a Data Environment with a SQL Stored Procedure that reads from several different tables:

    Code:
          .Write "<table rules = none align = top border = 0 cellpadding = 2 cellspacing = 5>"
          .Write "<tr>"
          .Write "<td nowrap><b><font size = 3>Column Header 1</b></font></td>"
          .Write "<td nowrap><b><font size = 3>Column Header 2</b></font></td>"
          .Write "<td nowrap align = right><b><font size = 3>Column Header 3</b></font></td>"
          .Write "</tr>"
    'This opens the connection     
          DE1.StoredProcedure DE1.rsMyStoredProcedure.Fields("no")
    'This writes the table rows and cells until EOF
    
    Do Until DE1.rsMyStoredProcedure.EOF
          
          .Write "<tr valign = baseline>"
          .Write "<td nowrap><b><font size = 2>" & DE1.rsMyStoredProcedure.Fields("Field One") & "</b></font></td>"
          .Write "<td nowrap><b><font size = 2>" & DE1.rsMyStoredProcedure.Fields("Field Two") & "</b></font></td>"
          .Write "<td nowrap align = right><b><font size = 2>" & Format(DE1.rsMyStoredProcedure.Fields("Field Three"), "currency") & "</b></font></td>"
          .Write "</tr>"
          DE1.rsMyStoredProcedure.MoveNext
          Loop
    DE1.rsMyStoredProcedure.Close
        .Write "</table>"
    If you need help beyond this, just drop me an email!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width