When I fill an html table using ASP with data from a database, there is no
border around any cell that has no data. I know I can manually put in a
blank character or nbsp, but how do I do this when I am using asp? Has
anyone else had this problem and came across an easy fix?

Thanks,

Doug

Re: No table border for blank cell by McKirahan

McKirahan
Fri Sep 02 22:12:24 CDT 2005

"Doug" <dtcress@nospam.cox.net> wrote in message
news:1V7Se.7442$UI.1691@okepread05...
> When I fill an html table using ASP with data from a database, there is no
> border around any cell that has no data. I know I can manually put in a
> blank character or nbsp, but how do I do this when I am using asp? Has
> anyone else had this problem and came across an easy fix?
>
> Thanks,
>
> Doug

http://www.aspfaq.com/5003



Re: No table border for blank cell by Evertjan

Evertjan
Sat Sep 03 02:42:29 CDT 2005

Doug wrote on 03 sep 2005 in microsoft.public.inetserver.asp.general:

> When I fill an html table using ASP with data from a database, there
> is no border around any cell that has no data. I know I can manually
> put in a blank character or nbsp, but how do I do this when I am using
> asp? Has anyone else had this problem and came across an easy fix?
>

<% ' VBS
function neverEmpty(x)
y = mData(x)
if y = "" then y = "&nbsp;"
neverEmpty = y
end function
%>

.....
<td><% = neverEmpty("fieldName") %></td>
<td><% = neverEmpty("fieldDate") %></td>

not tested

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


Re: No table border for blank cell by Dave

Dave
Sat Sep 03 11:17:06 CDT 2005

Doug wrote:
> When I fill an html table using ASP with data from a database,
> there is no border around any cell that has no data. I know I
> can manually put in a blank character or nbsp, but how do I do
> this when I am using asp? Has anyone else had this problem and
> came across an easy fix?

Here is one approach:

<style type="text/css">
table.data { border-collapse: collapse; border: 1px solid #333; }
table.data td, table.data th { border: 1px solid #ccc; }
</style>

<table class="data"> ... </table>



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.



Re: No table border for blank cell by Doug

Doug
Mon Sep 05 14:02:11 CDT 2005

Interesting I am using css, so this may be my best approach.

Thanks much.

Doug

"Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
news:11hjj417ov07gc3@corp.supernews.com...
> Doug wrote:
> > When I fill an html table using ASP with data from a database,
> > there is no border around any cell that has no data. I know I
> > can manually put in a blank character or nbsp, but how do I do
> > this when I am using asp? Has anyone else had this problem and
> > came across an easy fix?
>
> Here is one approach:
>
> <style type="text/css">
> table.data { border-collapse: collapse; border: 1px solid #333; }
> table.data td, table.data th { border: 1px solid #ccc; }
> </style>
>
> <table class="data"> ... </table>
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.
Use
> of this email address implies consent to these terms. Please do not
contact
> me directly or ask me to contact you directly for assistance. If your
> question is worth asking, it's worth posting.
>
>