Summary


Most of what you've seen in this chapter hasn't been new – it's been covered elsewhere in the book. What we've started to do however, is to pull many of the techniques you've learned together, showing how to create integrated pages. In particular we've looked at:

  • Creating a database table – We created a new table for our guest book entries, to allow the fans of the band to leave messages.

  • Centralizing database connection details – Here, we used the ASP.NET configuration file (web.config) to store the connection string for our database. This allows us to have these details in only a single place, allowing them to be maintained more easily.

  • Displaying guest book entries – We looked at using the default properties of the grid, and then we customized them to only show the columns we required, and to ensure that we could only sort on the columns we needed to sort on.

  • Adding new guest book entries – Here, we showed how to call a SQL statement to insert a fan message into the guest book.

  • Formatting a guest book message – Here, we used some custom formatting within our data-binding expressions to show some nicer formatting. This sort of ability brings a more human touch to the guest book, and makes it more enjoyable to use.

  • Centralizing code – Next, we moved our formatting functions into a central location, to allow them to be used elsewhere in our application. This saves having to duplicate code at a later point.

At the end of the chapter, we integrated the guest book into our existing website, giving the fans a great and easy way to communicate with the band. Now we're going to look at the flip side – a way for the band to communicate with their fans by adding a tour diary, and some security so that only the band members can log into the diary pages.




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