AspDotNetAtoms.com provides daily updates on ASP.NET Tutorials, Programming Resources, .NET Articles, Authors and more.

Categories

Recent Posts

Formatting the DataList and Repeater Based Upon Data : Scott Mitchell

Wednesday, September 17 2008

As we saw in the preceding tutorial, the DataList offers a number of style-related properties that affect its appearance. In particular, we saw how to assign default CSS classes to the DataList’s HeaderStyle, ItemStyle, AlternatingItemStyle, and SelectedItemStyle properties. In addition to these four properties, the DataList includes a number of other style-related properties, such as Font, ForeColor, BackColor, and BorderWidth, to name a few. The Repeater control does not contain any style-related properties. Any such style settings must be made directly within the markup in the Repeater’s templates. Often, though, how data should be formatted depends on the data itself. For example, when listing products we might want to display the product information in a light gray font color if it is discontinued, or we may want to highlight the UnitsInStock value if it is zero. As we saw in previous tutorials, the GridView, DetailsView, and FormView offer two distinct ways to format their appearance based on their data....

Read More:
Formatting the DataList and Repeater Based Upon Data : Scott Mitchell
Also See:
Working with WebParts Page, WebPart Zones & WebParts : Muhammad Mosa
ASP.NET Tip: Control the Layout of Your Input Forms : Eric Smith
ASP.NET Dynamic Data: Customizing the UI : Brad Abrams
Working with ReportViewer control of ASP.NET 2.0 : Bipin Joshi
Web Parts in ASP.NET : Richard Bean

Post your comment

Comment