ASP.NET
  Home arrow ASP.NET arrow Page 3 - 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 - Registration


    (Page 3 of 4 )


    Figure 8—the running-time snapshot for users to finally submit their registration info

    From the above figure, we can see that all the information displayed here is just the same as that entered in the previous step. When the user clicks the "OK" button the related user information will be saved finally into the server-side SQL Server database, while when he clicks the "Previous" button he will once more be navigated back to the previous page, "Register.aspx."

    In addition, there are also two things worth  mentioning. First, we use Firefox instead of IE to test the page; and second, the phone call number format follows the form "nnn-nnnnnnnn" while the mobile number format follows the form "13nnnnnnnnn" (refer to the downloaded source code).


    Finally, let’s delve into the related submitting code, as follows:

    protected void SureBtn_Click(object sender,EventArgs e){

    if(Session[Session.SessionID + UserInfo.UserIDString] == null){

    return;

    }

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

    User user = new User();

    if(user.AddUser(userInfo.UserName,

    userInfo.RealName,userInfo.Password,userInfo.Address,

    userInfo.Phone,userInfo.Mobile,userInfo.Email,3,userInfo.Remark) > -1)

    {

    Response.Write("<script>window.alert('Register successfully.')</script>");

    }

    else {

    Response.Write("<script>window.alert('Register failure! Check your register info again.')</script>");

    }

    }

    First, we judge whether the user has populated his registration information, or else we do nothing. Next, we obtain the user registration information via the browser variable Sessionand save it into a UserInfoinstance. Then, by invoking a member function, namelyAddUserof the instance of class Userthe details of the user registration are persisted into the back-end database table User. Finally, we display the information of the operating result via the typical "Response.Write" invocation. That’s all.

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