DataList Creates Tables That Are Not Well-Formed

N

Nathan Sokalski

I have a DataList control that has 3 columns (RepeatColumns property = 3).
However, because the number of Items in the DataSource is not always equally
divisible by 3, the last 1 or 2 cells in the generated Table is sometimes
missing. Rather than place code such as <TD></TD> there, ASP.NET simply
leaves it blank. Therefore, the last row is sometimes not well-formed. This
not only causes problems in some browsers, but because my Templates have a
background color, the area of the missing cell looks weird because the page
background shows through. I am sure I am not the first person to have this
problem, so I would think that there should be some way around this other
than writing extra code (I know how to use the Mod operator, but I want to
know if there is some way without doing extra calculations. Is there? Is
there one in ASP.NET 2.0? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top