DetailsView Control Example
Example Summary and Logic
The DetailsView control is used to display one or more fields from a single data record.
The unadapted version of the DetailsView control renders these fields as rows in an HTML
<table>. An adapter can be used to render an unordered list (<ul> and <li>
tags) instead.
The unadapted DetailsView uses table cells (<td> tags) to separate each field's descriptive
(header) text from its value. The adapted control uses <span> tags instead. By styling
these <ul>, <li> and <span> tags with CSS you can customize nearly every
aspect of the DetailsView's appearance.
Working Example
-
ID998-72-3567
-
Last nameRinger
-
First nameAlbert
-
Phone801 826-0752
-
Street67 Seventh Av.
-
CitySalt Lake City
-
StateUT
-
ZIP code84152
-
Contracttrue
-
Edit