.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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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: 4 stars4 stars4 stars4 stars4 stars / 3
    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


    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

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek