ASP.NET 2.0 Instant Results
.pdf7
Modifying the Wrox
Photo Album
Although the photo album is fairly concise in its scope, it likely does not contain all of the extra features and enhancements that you might want to have. Some possible enhancements to the photo album could include:
Implement paging for the DataList control that displays the images in a grid. This way, the images would be displayed in the same grid-like fashion, but also span across an unlimited number of pages instead of requiring the user to scroll down the page.
Create an email alert feature that allows users to sign up for alerts whenever new images are added to the photo album.
Create a new theme or skin for the website to use in its formatting and color scheme.
Create a slide show feature in JavaScript to show the images one at a time, with a fade effect between images.
Create a feature that would allow website visitors to ask questions or make comments about a particular image on the photo album to the photographer or web site owner.
If you want to take on the last of the above proposed features, creating a way for viewers to ask questions about any image and track feedback, there would be several areas that you would need to modify within the application to accomplish this. This feature would infer that for any images’ detailed view page, there would be an opportunity for the web site viewer to enter text and save the text to the database for all to see. All feedback to such inquiries would be posted near the image for future visitors to observe. This would provide an overall more interactive experience for the user and the photographer alike.
To implement this feature, the following steps would be required:
1.In VWD, open the database explorer by selecting the View | DataBase Explorer menu selection. Find your database under the database connections node of the tree view. If your database is not listed, right-click the data connections node in the tree view, select the add connection option, select the Microsoft SQL Server File option, and browse to the PhotoDB.mdf file in the App_Data folder of the site. This should bring up your connection within the database Explorer window.
8
Modifying the Customer
Suppor t Site
One possible extension to the Customer Support Site is to allow your users to contact you through a Contact form. That way, your users can ask you questions about your product. These questions and their answers can then be added to the Frequently Asked Questions list on the site.
The first part of this section guides you through the process of creating such a feature. It shows you how to create the form and how to send an email to your support department when a user fills in the form. As a bonus, you’ll also learn how to store the user’s details in a profile so repeating customers don’t have to enter their details over and over. To implement the Contact form, follow these steps:
1.Start by adding a new page called Contact.aspx in the ContentFiles folder. Base this page on the MainMaster.master page.
2.In the MainMenu.ascx control in the Controls folder, add a link to this new page so users can access it.
3.On the Contact page, create a form with text boxes for the user’s name, email address, and their question or remarks. Name these controls txtUserName, txtEmailAddress, and txtComments, respectively. Set the TextMode property of txtComments to MultiLine. Add a button called btnSave with the text of Send Comments.
4.Add a checkbox called chkRememberMe with a descriptive text offering the user to have their details saved for them. Next, add a label called lblStatus that is used to tell the user their message was sent successfully.
5.If you want, you can change the page layout to whatever you see fit. You can use tables and labels to improve the readability of the page.
6.Double click the button in Design View so VWD adds the required code to handle the Click event of the button.
7.Switch to Design View again and double click anywhere on the page. This adds the code to handle the Page_Load event.