.NET
  Home arrow .NET arrow Completing a Simple Storefront with LINQ
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Completing a Simple Storefront with LINQ
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2008-05-13

    Table of Contents:
  • Completing a Simple Storefront with LINQ
  • Markup
  • Building the Product Browse Page
  • Building the Product Browse Page, Continued

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Completing a Simple Storefront with LINQ


    (Page 1 of 4 )

    In the last article, we created the storefront's home page, which displayed the three latest products. To do this, we used LINQ in the code-behind file, manually databinding a ListView with the results. We also started to create the Product.aspx page, which displays more detailed information about a given product. In this article, we'll finish the storefront by completing the Product.aspx page and creating the Browse.aspx page, which will allow the user to browse products by category.

    In the first article of this series, we laid out the plans for a very simple storefront for the Adventure Works Cycles sample database that would demonstrate the use of LINQ in ASP.NET Websites. We created a master page for the entire site and put together a stylesheet for the site. We also examined the relevant tables in the database, and we created a page that would display a product's image, given the product's ProductID.

    Creating the Product View Page

    With the database setup, we can now begin creating the product view page, Product.aspx. This page should accept a ProductID in the query string and then display information about that product, including the product's description, which we set up our Website to handle in the last article.

    Additionally, it would be wise to make sure that the ProductID is set in the query string, and that the given ProductID matches an entry in the database. This is similar to what we did with ProductPicture.aspx, except now we can display an error message rather than just have the page output nothing. This can be handled through a MultiView control. Inside the MultiView, one View can be a simple error message, alerting the user that the ProductID is invalid. The other View, then, can display the chosen product's information.

    More .NET Articles
    More By Peyton McCullough


       · Hello, everyone. This is the last article on my series about creating a simple...
     

    .NET ARTICLES

    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries
    - Introducing LINQ to SQL Designer using Visua...
    - Beginning LINQ to SQL Using Visual Studio 20...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway