ASP.NET
  Home arrow ASP.NET arrow Page 2 - Programming 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

Programming 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 / 6
    2007-12-12

    Table of Contents:
  • Programming an ASP.NET AJAX Server-Centric Based Online Shopping Website
  • Running Time
  • Registration
  • Logging On and Logging Off

  • 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


    Programming an ASP.NET AJAX Server-Centric Based Online Shopping Website - Running Time


    (Page 2 of 4 )


    The following Figure 7 shows the running time snapshot relating to the above page.


    Figure 7—the running-time snapshot when users register

    For brevity, we’ve only "decorated" three ASP.NET TextBox controls in Figure 7 with the above three extender controls. Any user who has had a few desktop application experiences will appreciate this kind of web application design mode—it drastically enhances the user experience!

    When the registering user clicks the "OK" button the related click event handler SureBtn_Clickis triggered. Note herein we temporarily save the registration information into one of the important browser-side variables, namedSession, and then redirect the user to another page, "CommitRegister.aspx," where he can really submit his registration information to the remote web server.

    For the convenience of using Session, we’ve defined a helper class, UserInfo, which encapsulates all the detailed data that he just entered. The following code gives more detail:


    public class UserInfo{

    public string UserName;

    public string RealName;

    public string Password;

    public string Address;

    public string Email;

    public string Phone;

    public string Mobile;

    public string Remark;

    public readonly static string UserIDString = "USERINFO";

    }

    Let’s examine the code of the above event handler:

    protected void SureBtn_Click(object sender,EventArgs e) {

    User user = new User();

    UserInfo userInfo = new UserInfo();

    userInfo.UserName = UserName.Text;

    userInfo.RealName = RealName.Text;

    userInfo.Password = Password.Text;

    userInfo.Address = Address.Text;

    userInfo.Phone = Phone.Text;

    userInfo.Email = Email.Text;

    userInfo.Mobile = Mobile.Text;

    userInfo.Remark = Remark.Text;

    Session[Session.SessionID + UserInfo.UserIDString] = userInfo;

    Response.Redirect("~/Desktop/CommitRegister.aspx");

    }

    Surely, there’s nothing peculiar, is there? Now let’s continue looking at the page on which the registration is finished. The following Figure 8, shown in the next section, gives the related runtime snapshot of the "CommitRegister.aspx" page.

    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 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek