Chapter 11: Creating a More Flexible Guestbook Listing


Overview

In Chapter 10, you created a guestbook page where Web page visitors can enter comments, and you also created a simple page for displaying the guestbook entries. In this chapter, I ll show you how to create a page to display data using a layout that you design yourself.

Up to now, you ve been using the MxDataGrid control to display data. Using the MxDataGrid control to display data is easy and fast, and it offers sorting and paging. The disadvantage of using the MxDataGrid control, however, is that it always displays a grid. You ll often want to display data in a less restrictive way, and Microsoft ASP.NET offers a couple of controls that provide more layout flexibility: the DataList control and the Repeater control. Both controls allow you to display data in almost any format you like. In this chapter, you ll concentrate primarily on using the DataList control, which is the easier of the two to work with.

You have to pay a price, however, for more freedom in your data layout: you re required to do a bit more work to create a data-bound page than simply dragging a table onto the page and pressing F5, as you did in Chapter 9 and Chapter 10. But once you get the hang of working with the DataList control, you ll find it useful for all sorts of data display jobs.




Microsoft ASP. NET Web Matrix Starter Kit
Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
ISBN: 0735618569
EAN: 2147483647
Year: 2003
Pages: 169
Authors: Mike Pope

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net