Overview of the ASP.NET Unleashed Sample Store


Before getting into the details of building the store, you'll benefit from a quick tour of the structure of the application.

The ASP.NET Unleashed Sample Store contains the following six ASP.NET pages (all these pages can be found in the root directory of the application):

  • Default.aspx ” The homepage of the store.

  • Category.aspx ” Displays links to all the products in a category.

  • Product.aspx ” Displays information on a particular product.

  • CheckOut.aspx ” A page that confirms whether a user wants to check out of the store and purchase the items in the shopping cart.

  • PlaceOrder.aspx ” The final checkout page that contains a form for billing and shipping information.

  • ThankYou.aspx ” A page that thanks the user for purchasing items at the Web site.

You navigate between the pages in the store by using a tab control. Each tab on the tab control corresponds to a product category (see Figure 31.1). When you click a tab, you arrive at the Category.aspx page. From the Category.aspx page, you can link directly to different product descriptions. All product descriptions are displayed by the Product.aspx page.

Figure 31.1. Navigating with the tab control.

graphics/31fig01.jpg

The Default.aspx , Category.aspx , and Product.aspx pages all contain a shopping cart within their left panel. The shopping cart includes a link for checking out of the store.

When you click this link, you arrive at the CheckOut.aspx page. From the CheckOut.aspx page, you link to the PlaceOrder.aspx page and ultimately to the ThankYou.aspx page.

All the ASP.NET pages (except the ThankYou.aspx page) use several SQL Server database tables. The application relies on the following database tables:

  • Products ” Contains the information for all the products displayed at the Web site.

  • Categories ” Contains a list of the product categories.

  • ShoppingCarts ” Contains all the user shopping carts.

  • OrderDetails ” When a user finalizes a purchase, all the items in the user's shopping cart are transferred to this table.

  • Orders ” Contains the billing and shipping information that the user submits from the PlaceOrder.aspx page.

The ASP.NET Unleashed Sample Store also uses three user controls for common user interface elements. All these controls can be found in the UserControls subdirectory:

  • Tabs.ascx ” A simple tab control that enables you to navigate from one page to another at the store.

  • ShoppingCart.ascx ” The user interface portion of the shopping cart.

  • Address.ascx ” A user control used for the shipping and billing address forms within the PlaceOrder.aspx page.

Finally, the store makes use of one assembly named StoreComponents . The source code for this assembly can be found in the Components subdirectory. The StoreComponents assembly contains three components:

  • CachedData ” This component represents all the cached product and category information. The component automatically retrieves all the products and product categories from SQL Server and stores this information in the Cache object.

  • ProductTemplate ” A code-behind class for the product template user controls. All the product template user controls inherit from this class.

  • ShoppingCart ” The guts of the shopping cart can be found in this class. This class handles adding and removing items from the shopping cart. It also takes care of automatically updating the ShoppingCarts database table when changes are made to the items in the shopping cart.

In the next section, you learn how to install these files on your server so that you can experiment with the ASP.NET Unleashed Sample Store.



ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon

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