Html table using DIV element

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
 
J

Joern Schou-Rode

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.
 
M

Mike Gleason jr Couturier

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
 

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

Top