ASP.NET 2.0 - Give me table border back!!
Someone asked me about why tables in his pages will have no border just after upgrading from .NET 1.1 to .NET 2.0 without any code changing. It was easy (relatively) to find the root cause, but it took me some time to find a simplest solution for him. Problem description : WebControls DataGrid & Table will render without border even it is set in gridline/border property in the code. Analysis: After comparing the output HTML of .NET 1.1 & .NET 2.0, both will have a HTML table with correct border settings in HTML attribute Style: style="border-color:#000000; " But there is another HTML attribute named bordercolor set with right color as value in .NET 1.1: bordercolor="#000000" Therefore, the root cause is that there is no such attribute "bordercolor" in element “Table” according to HTML 4.01 speciation. Attribute “bordercolor” is one of the IE-ONLY attributes (from IE 3+), but IE6 does not recoginize CSS border-color . Thus, .NET 2.0 renders corr