Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Web
Expertise: Beginner
Dec 11, 2001

Displaying a Recordset in a Table with a Border


When displaying a recordset in a table with a border, if there is no data returned for a cell, the borders will not show up around that cell. To alleviate this, hard code a space (nbsp;) after each field so if no data is returned, it will still show the borders. Here is an example:
 
<HTML>
<TABLE BORDER=1>
<%
Do While Not rs.EOF
Response.Write "</TR><TD>" & rs("Column1") & "nbsp;</TD>"
Response.Write "<TD>" & rs("Column2") & "nbsp;</TD></TR><BR>"
rs.MoveNext
Loop
%>
</Table>
</HTML>
Jill Herrmann
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date