ASP.NET
  Home arrow ASP.NET arrow Back-end Management Tasks for an ASP.NET A...
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? 
ASP.NET

Back-end Management Tasks for an ASP.NET AJAX Server-Centric Based Online Shopping Website
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2008-01-16

    Table of Contents:
  • Back-end Management Tasks for an ASP.NET AJAX Server-Centric Based Online Shopping Website
  • Moving Tree Nodes
  • Product Management
  • The Product Manage Page
  • Adding New Product
  • About Viewing Products

  • 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


    Back-end Management Tasks for an ASP.NET AJAX Server-Centric Based Online Shopping Website


    (Page 1 of 6 )

    This is the eighth part of an eleven-part series on building an online shopping web site. In this part, we will continue to look into the backside management tasks associated with product and order adding, modifying, and deleting, as well as managing comments on the products.
    A downloadable .rar file is available for this article.

    Product Category Management

    This part is done through the "Category.aspx" page. The following outlines the functionalities it will accomplish:


    1. Show the product category info in control TreeView.
    2. Provide the hyperlinks to add a new product category. 
    3. Provide the hyperlinks to modify the product categories. 
    4. Delete the specified product category. 
    5. Move the selected category upward. 
    6. Move the selected category downward.


    The Interface Design

    The following Figure 27 shows the design-time snapshot for product category management.


    Figure 27—the design-time snapshot for product category management

    As you can see from the above figure, this will involve some typical tree control operations: adding, modifying, deleting, and moving the tree nodes.

    Initialization

    When the "category.aspx" page is first initialized, it should be able to display the present product categories in the TreeView control. And at the same time it should check whether or not the five Button controls in the page are enabled. Finally, it should attach a confirm dialog to the "Delete" button.

    protected void Page_Load(object sender,EventArgs e){

    if(!Page.IsPostBack){

    BindCategoryData();

    }

    ///set the availability of the button

    AddBtn.Enabled = UpBtn.Enabled = DownBtn.Enabled = EditBtn.Enabled =
    DeleteBtn.Enabled

    = CategoryView.SelectedNode == null ? false : true;

    ///add the dialog that confirms the user to make the deletion

    DeleteBtn.Attributes.Add("onclick","return confirm('Are you sure to delete
    the selected items?');");

    }

    private void BindCategoryData(){

    Category category = new Category();

    category.BindCategoryTreeView(CategoryView,true,"-1");

    }

    Again, there are already enough comments provided here. The core work is done using the BindCategoryData helper function,which in turn invokes one of the important methods—BindCategoryTreeViewof the Category class. However, still for brevity, we do not delve into this method; you can refer to the "Category.cs" file under the App_Code folder that accompanies the downloadable source code (it provides a series of typical ASP.NET TreeView control operations).

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





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