create table

Results 1 to 2 of 2

Thread: create table

  1. #1
    Join Date
    Dec 1969

    Default create table

    pretty new to asp so sorry if this is a lowlevel question.<BR><BR>I need to create a table of X rows where X is a value pulled from a given record of an access database.<BR><BR>can someone share the basic syntax with me? (just the table creation part is fine - I&#039m doing alright with the database stuff)<BR><BR>many thanks

  2. #2
    Gabbar Guest

    Default RE: create table

    Suppose your record has the value : i<BR><BR>Here&#039s the code. Its vb syntax. figure out the asp syntax urself.<BR><BR>string_for_browser = &#060;table&#062;<BR><BR>for counter_variable = 1 to i<BR><BR> string_for_browser = string_for_browser & "&#060;tr&#062;&#060;td&#062;" & Server.htmlencode(rs.Fields("x").Value) & "&#060;/tr&#062;&#060;/td&#062;"<BR><BR>next counter_variable<BR><BR>string_for_browser = string_for_browser & &#060;/table&#062;<BR><BR>Response.Write(string_for_brows er)<BR>---<BR>got the hang of it ... ??<BR><BR>u basically append the &#060;tr&#062;&#060;td&#062; tags before the data to be sent and the end tags after it and output this whole string to the browser, in a loop.<BR><BR>remember to add the table tags before and after the loop and to keep appending the string_for_browser to the old one.<BR><BR>Ok !

Posting Permissions

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