Html table using DIV element

  • Thread starter Thread starter ochocki
  • Start date Start date
O

ochocki

Hi,

On site I create there is a lot of tables. Those tables are of course
generated using Table class, which generates html tables using <table>/
<tr> and <td> tags. It is very trendy and recomended to use DIV tags
to build tabular views. The question is how to achieve it using
ASP .NET?

I know I can throw out Table class and implement my own Table deriving
it from WebControl. But this does not make sense to me (I think it's
obvious why).

Any solution? What does Microsoft recommends?

/M
 
On site I create there is a lot of tables. Those tables are of course
generated using Table class, which generates html tables using <table>/
<tr> and <td> tags. It is very trendy and recomended to use DIV tags
to build tabular views. The question is how to achieve it using
ASP .NET?

I am afraid you might have missed the point in the trend to move from
table based layout to semantic markup and CSS.

The idea has never been to use div elements for everything, but rather to
use whatever element describing your content best. For tabular data, that
element is indeed table (along with thead, tbody, tfoot, tr, th and td),
which is what you will get when using the Table class.
 
Hi,

On site I create there is a lot of tables. Those tables are of course
generated using Table class, which generates html tables using <table>/
<tr> and <td> tags. It is very trendy and recomended to use DIV tags
to build tabular views. The question is how to achieve it using
ASP .NET?


You can also look at the CSS Friendly Adapters to output more elegent HTML
when you use some specific ASP.NET controls... (the Menu control for
example)

Mike
 
Back
Top