HTML table in ASP loop

Results 1 to 4 of 4

Thread: HTML table in ASP loop

  1. #1
    Margaret Widholm Guest

    Default HTML table in ASP loop

    Ok, I have an HTML table in an ASP loop. When the fields from the database are empty the table doesn&#039t even show a border around the field leaving big white patches in the middle of my table. Nathan- thanks for this suggestion:<BR>If Format(objRS("FieldName")) = "" then<BR> response.write("&nbsp;")<BR> Else<BR> response.write(objRS("FieldName"))<BR> End If<BR>I tried that, but when I do it, it prints the borders, but it doesn&#039t get the fields that actually ARE populated... I have the code inside the loop and everything, so it should read each record as it comes along... I&#039m really lost here, if anyone could help- thanks!

  2. #2
    Join Date
    Dec 1969
    Posts
    131

    Default RE: HTML table in ASP loop

    I was having this problem as well. I wrote an If statement to write "No Data" if there exists no records for that row however that wasen&#039t working. I remember an old HTML trick (&nbsp;)and I put something like this.........<BR>&#060;Table&#062;<BR>&#060;tr&#06 2;<BR> &#060;td&#062;&#060;%=oRsprofile("Last_Name") %&#062;&nbsp;&#060;/td&#062;<BR>&#060;/tr&#062;<BR>&#060;/Table&#062;<BR><BR>What this does is, if there are no records, it will put the border around that empty cell. Hope this helps

  3. #3
    miller Guest

    Default RE: HTML table in ASP loop

    try adding a nbsp; at the end of the response.write(objRS("FieldName")) <BR><BR>like: response.write(objRS("FieldName") & "&nbsp;")

  4. #4
    Join Date
    Dec 1969
    Posts
    131

    Default RE: HTML table in ASP loop

    Sorry, the nbsp; did not get posted with my response earlier


Posting Permissions

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