ASP.NET
  Home arrow ASP.NET arrow Completing an ASP.NET AJAX Server-Centric ...
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

Completing 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 / 9
    2008-02-06

    Table of Contents:
  • Completing an ASP.NET AJAX Server-Centric Based Online Shopping Website
  • Ajaxifying the Operation Module
  • Notification Module
  • Customer/Supplier Functionality Module
  • Loading Foreground Functionality Modules

  • 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 an ASP.NET AJAX Server-Centric Based Online Shopping Website


    (Page 1 of 5 )

    After a long trip, we finally come to the last article of our eleven-part series on building an online shopping website. Now let’s examine the controlling modules of the sample, specifically the foreground management modules of the shopping city.
    A downloadable .rar file is available for this article.

    The Foreground Management of the Shopping City

    In fact, all the modules related to this part are created entirely through use of ASP.NET UserControls.

    Now, let’s first delve into the news module.

    News Module

    The news module is handled by using the "NewsUC.ascx" UserControl which is mainly responsible for showing the first ten pieces of news about the shopping city in animating rolling form. Figure 39 gives the run-time snapshot of the foreground control panel before any user logs in. In Figure 39, the bottom part marked by red bold lines is just the news module to be discussed here.


    Figure 39—the run-time snapshot for the foreground news modules

    In the respect of design there is only a control DataList named "NewsList" with each of its records used to display the news title of each piece of news. Note that to gain the better effect of user vision, the HTML element <marquee> is leveraged to roll the news titles, as is shown in the following list:

    <marquee id="ScrollNews" scrollamount="1" scrolldelay="50" direction="up"
    behavior="scroll"

    height="182" onmousemove="stop()" onmouseout="start()">

    <asp:DataList ID="NewsList" runat="server" Width="100%" CssClass="Text">

    <ItemTemplate>

    <a href='../Admin/Information/NewsInfo.aspx?NewsID=<%#DataBinder.Eval
    (Container.DataItem,"NewsID") %>' target="_blank"><%# DataBinder.Eval
    (Container.DataItem,"Desn") %></a>

    </ItemTemplate>

    <ItemStyle HorizontalAlign="Center" />

    </asp:DataList>

    </marquee>

    Next, let’ take a short look at the initialization of this module.

    protected void Page_Load(object sender, EventArgs e){

    if(!Page.IsPostBack) {

    BindNewsData();

    }

    }

    private void BindNewsData(){

    ///Define the class that gets the data

    News news = new News();

    SqlDataReader dr = news.GetNewss();

    ///Set the control's data source

    NewsList.DataSource = dr;

    ///bind data to the control

    NewsList.DataBind();

    ///Close the database connection

    dr.Close();

    }

    Here the crucial programming is related to the BindNewsData helper functionwhich performs the task of getting the first ten pieces of news-related data and typically uses a SqlDataReaderobject to hold the result. At last, the data is bound to the  DataListcontrol named "NewsList."

    In the next section, let’s discuss the general operation module.

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - 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...
    - Building an In-Text Advertising System Under...
    - Developing a Mini ASP.NET AJAX Server Centri...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT