18.6. Building a Page to Manage Cart Contents

To complete the shopping cart enhancement of the Small Business Starter Kit, you need a page where users can view and change the contents of the shopping cart. In this section, you create the data connection and add a DataGrid.

18.6.1. Adding the shopcart.aspx page

The Small Business Starter Kit uses a master page to present the common page elements and styles. Follow these steps to add a new page that follows the existing site's layout and column structure:

  1. Making sure to select the site's master page, add a new page (FileNew FileWeb Form) named shopcart.aspx to the project.

  2. In Source view, just before the closing </asp:Content> tag, add the markup shown in Listing 18-9.

Listing 18-9. Replicating the Column Structure
<div id="pagetitle" style="right: 0px; top: 0px">
     Shopping Cart
<div id="content-container-three-column" style="right: 0px; top: 0px">
    <div id="content-side1-three-column">
    <div id="content-main-three-column" style="text-align: right">
        <h1 style="text-align: left">Shopping Cart</h1><hr />
<!-- GridView Goes Here -->
    <br />

The markup in Listing 18-9 is purely cosmetic. It generates the three-column layout and indicates the location of the GridView that you add later in this chapter.

18.6.2. Adding ...

Get ASP.NET 3.5 For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.