TRY IT OUT Letting Users Manage Their Own Photo Albums
In this Try It Out you see how to block the NewPhotoAlbum.aspx and ManagePhotoAlbum.aspx pages from unauthenticated users. Additionally, you see how to record the name of the user who created the photo album and use that name later on to enable users to alter their own photo albums.
1. Open SQL Server Management Studio from the Windows Start menu or Start screen. Open your PlanetWrox database, and locate the PhotoAlbum table. Right-click it and choose Design. Add a new column called UserName, set its data type to nvarchar(256), and leave the Allow Nulls option selected. (This table already contains photo albums without a valid UserName, so you can’t make the column required at this stage unless you delete these photo albums and their related
666 x CHAPTER 17 PERSONALIZING WEBSITES pictures from the database fi rst, or manually enter a username for each existing row.) Save your changes to the table and close SSMS.