ASP.NET
  Home arrow ASP.NET arrow User Information Management for an ASP.NET...
Iron Speed
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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
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

User Information Management for an ASP.NET AJAX Server-Centric Based Online Shopping Website
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-01-09

    Table of Contents:
  • User Information Management for an ASP.NET AJAX Server-Centric Based Online Shopping Website
  • Modifying Personal Info
  • Page Initialization
  • Viewing Personal Info

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    User Information Management for an ASP.NET AJAX Server-Centric Based Online Shopping Website
    (Page 1 of 4 )

    In this seventh part of an eleven-part series, we will research common user information management tasks. This includes the topics of changing the password, modifying personal information, viewing private information, viewing the order information (discussed earlier), and more.
    A downloadable .rar file is available for this article.

    User Information Center

    Let's begin by discussing how to provide a feature that allows the users to modify their passwords.

    Editing Password

    This part is done through the "EditUserPwd.aspx" page whose design-time snapshot is shown in Figure 24 below.


    Figure 24—the page for the common users to edit password

    First of all, the ScriptManagercontrol is a must. Second, the Toolkit control PasswordStrengthmaybe the only thing that attracts our attention. Yes, as you may have imagined, when the user wants to change his password, besides verifying his old password with data in the database, we use the PasswordStrengthcontrol to confirm the safety strength of the newly-entered password and give him a friendly hint. Besides this, we have also leveraged two Validators, theRequiredFieldValidatorand the CompareValidatorto make sure the user enters the proper new password.

    The following only lists the code that is associated with the event handler of the "OK" button:

    protected void SureBtn_Click(object sender,EventArgs e){

    User user = new User();

    SqlDataReader dr = user.GetUserLogin(UserName.Text.Trim(),OldPassword.Text.Trim());

    ///read the value of UserID

    string sUserID = "";

    if(dr.Read()) { sUserID = dr["UserID"].ToString(); }

    ///Close the data source

    dr.Close();

    ///judge whether the old password he enters is correct or not

    if(sUserID == null || sUserID == "" || sUserID.Length < 0){

    Response.Write("<script>alert('" + "The old password is invalid. Please enter again!"

    + "');</script>");

    return;

    }

    ///Change the user password

    user.UpdateUserPwd(nUserID,NewPassword.Text.Trim());

    Response.Write("<script>alert('" + "You have successfully modified the password. Keep your data safely!"

    + "');</script>");

    }

    Here, there are already enough comments. The entire logic is easy to grasp, isn’t it?

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...
    - Order-Related Modules for an ASP.NET AJAX Se...
    - User and Role Management for an ASP.NET AJAX...
    - Programming an ASP.NET AJAX Server-Centric B...
    - Tables and Relationships for an ASP.NET AJAX...
    - Building an ASP.NET AJAX Server-Centric Base...
    - Finishing an Introductory Look at CIL
    - An Introduction to CIL

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway