Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

18.5. Updating a Web Page to Add Profile Data

In the preceding section, you created the plumbing that adds, removes, and updates a shopping cart. The ASP.NET Profile object takes care of storing each user's shopping cart in the database.

The great thing about adding a shopping cart to Microsoft's code (that is, the Small Business Starter Kit) is that Microsoft did the design work. In this section, you find a spot to insert a LinkButton control that adds an item to the user's shopping cart.

18.5.1. Inserting a LinkButton into the page

It can be tricky to update a page without messing up an existing layout. Follow these instructions to add the LinkButton markup with a minimum of collateral damage:

  1. In the Small Business Starter Kit project, open Items.aspx.

  2. In Design view, near the bottom of the page, locate the GridView control with the ID of GridViewItems. (Be careful because there's also a GridViewCategories that you don't want to disturb.)

  3. From the GridView control's Tasks menu, choose Edit Templates.

    The ItemTemplate template appears, as shown in Figure 18-4.

    Figure 18-4. Editing the ItemTemplate in GridViewItems.
  4. Insert the cursor to the right of the Read More hyperlink and type a space, a pipe character (|), and another space. Leave the cursor where it is.

  5. In the Standard category of the Toolbox, double-click a LinkButton control to insert the control at the cursor location.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book