Layouting Formview without Tables and use CSS
I hate Detailsview. The editing of templates for each Column sucks. I prefer the Formview control which use one template per mode (insert, update, item). The problem is how to design this form cause there are no tables by default and also tables are not state of the art today.
Real ugly result and not what should be!
The second bad part shows up on rendering. The label text is rendered as plain text and also if you use ASP.NET label controls there is generated DIV tag. This is against accessibility rules. Microsoft have made in 2003 a patch for ASP.NET 1.1. But the same issue in 2.0!
Also the CSS Controls Adapters doesn't fix this kind of issue.
How should it be ( my opinion)
1) Formview wizard should automaticly create <LABEL> tags for the description in the IDE. "for" attribute point to the input field
<LABEL FOR=email ACCESSKEY=e>e-Mail</LABEL>
Must be done by hand now.
2) You add a small style rule for the label width
<
style>label
{ display: block; float: left; width: 80px;}
</
style>Done!
You can watch the result on session submission site of VSone.