ASP.NET 2.0 Instant Results
.pdf9
Wrox WebShop
E-commerce is one of the largest driving forces behind the Internet. Even in the Internet’s earliest days, many sites featured a shop where you could order products and have them shipped to your home. With the advent of server-side techniques, such as ASP and ASP.NET, it has been much easier and cheaper for smaller sites to offer their products and services online. Despite the large diversity in the goods these sites offer, they all have one thing in common. To allow customers to select the products they want to order, they all feature a product catalog and a shopping cart where products are stored during the shopping process. At checkout time, these products are taken from the cart and usually stored in a database so the order can be processed later. The Wrox WebShop is no exception; this chapter shows you how to create a web shop with a shopping cart in ASP.NET 2.0.
The chapter starts off with a quick tour of the WebShop from an end-user’s point of view. It guides you through the process of browsing articles and adding them to a shopping cart, and shows you how the shopping cart is saved in the database as an order. Finally, this chapter also explains how you can manage the product catalog for the WebShop.
Once you have a basic understanding of the functionality in the WebShop you dig into its design, discovering the business and data access layer classes that make up the application.
The section “Code and Code Explanation” puts it all together and explains how the ASPX pages interact with the classes in the business layer.
If you want to set up the WebShop so you can follow along with the explanation, refer to the section “Setting up the WebShop” near the end of this chapter.
Using the WebShop
The user interface of the WebShop consists of two main parts: the public area and the protected Management section. The public site is where your visitors can view and order products, and
the Management section allows you to manage the products in the catalog. The Management section is protected so only users in the Administrator group can access it.