ASP.NET
  Home arrow ASP.NET arrow Database Storage with the ASP.NET Web Matr...
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 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

Database Storage with the ASP.NET Web Matrix: Update Page
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 16
    2005-10-18

    Table of Contents:
  • Database Storage with the ASP.NET Web Matrix: Update Page
  • Important Details and Updates
  • Calling the Function
  • Taking Care of Security

  • 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


    Database Storage with the ASP.NET Web Matrix: Update Page


    (Page 1 of 4 )

    If you’ve been following this mini-series so far, you’ll know that we only have one basic database operation left to explore. We have looked at inserting, reading and removing data from a database table, all we need to do now is update our data. You’ll find that there are elements from nearly every page we have created so far in the updating page, even just a simple password update.

    To get started then, we need to build the visual elements of the page.  Open the Web Matrix, and in design view drag the following elements from the web controls toolbox onto the page: on the first line drag a label, a textbox and another label.  Onto the second and third lines, drag the same elements, then below these, drag a button onto the page.  Finally, drag another label to the line below the button.

    Obviously, you need to edit some of the properties of these elements.  If you didn’t already know, this is done in the Properties pane at the left-hand side of the document window.  First, set the text of the first label to Username: and then select the first textbox and set the ID to txtUsername.  Now select the label element following the textbox and set the ID to lblUsernameError, the Fore color to Red and clear the Text value.

    On the second line, set the Text of the first label to New Password:, set the textbox ID to txtNewPassword,  and set the ID of the second label to lblNewPasswordError. Then set the fore color to Red and clear the Text value.  Follow this format for the third line of the page, but set the Text to Verify New Password: and the ID values to txtVerifyNewPassword and lblVerifyNewPasswordError respectively.  Additionally, as the bottom two textboxes will contain passwords, you should set the TextMode property to Password to make the contents hidden when the page is used.  The button ID can be set to btnUpdate, while the Text value can be Update.  Finally, the label element on the last line should have the following properties: an ID of lblSuccess, a fore color of Green and an empty Text value.

    More ASP.NET Articles
    More By Dan Wellman


       · Hi all,Welcome to the fourth and penultimate article in the Web Matrix series. ...
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT