Chapter 12: Creating a Database-Driven Slideshow


Overview

In this chapter, you ll learn more about creating Web pages that get data from databases. You ll create some related tables (master-details tables), in which records from one table share data in common with records in another table. I ll show you how to display information from the master table on one page, and after users have selected a master record, switch to a second page that shows related detail records. In addition to learning to work with master-details tables, you ll learn some techniques for passing information between pages. Finally, you ll learn yet another way to maintain state between round trips.

In Chapter 5, you created a hard-coded slideshow page that is, the list of slides to be displayed was coded directly into the page. In this chapter, you ll learn how to create a dynamic slideshow page, in which the list of slides isn t coded into the page. In this case, you ll create slideshows as entries in a database. Users will be able to go to a slideshow picker page and select a slideshow to view. After users have selected a slideshow, they go to a slideshow viewer page, where they can view the slides that you ve specified for that show. The slideshow picker page will look similar to the page in Figure 12-1.

click to expand
Figure 12-1: A slideshow picker page that allows users to select a slideshow to view.

The slideshow page itself won t look substantially different from the one you created in Chapter 5. However, this slideshow page will contain different logic to retrieve information about which show the user wants to see and to read the correct list of slides from the database.




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
BUY ON AMAZON

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