Summary


In this chapter, we've concentrated on how you can build pages that display data extracted from a database. Web Matrix makes this easy, where a single table is involved, with its custom SqlDataSourceControl and MxDataGrid controls. As we've seen a couple of times now, it's just a simple drag-and-drop operation, perhaps with a few property setting changes to tidy it up and get exactly what you want displayed on the page.

We looked at how to display the data from the sample Cornflakes at Midnight database, and how we can modify the display to make it more attractive and intuitive, by choosing useful column headings for the grid, and changing the way the values are displayed. These changes included both the format of the text, and displaying hyperlinks and images within the rows of the grid.

The core technology behind all the presentation magic is server-side data binding, and we talked a little about what this actually is. We also saw it in action in all of these examples, and hopefully you can understand how cool it is to be able to work with data so simply.

Data binding also led us on to the idea of list control templates, and we looked at a simple example with the MxDataControl. You'll see plenty more examples of templates in the next chapter.

The list of topics we covered is:

  • How Web Matrix actually connects to a database table and extracts the data

  • How we can modify the appearance and content of the MxDataGrid control

  • What server-side data binding is, and how we take advantage of it

  • What list control templates are, and an example of how we can use them

In the next chapter, we'll continue our exploration of list controls and data binding, learning more about the code we use to work with databases.




Beginning Dynamic Websites with ASP. NET Web Matrix
Beginning Dynamic Websites: with ASP.NET Web Matrix (Programmer to Programmer)
ISBN: 0764543741
EAN: 2147483647
Year: 2003
Pages: 141

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