Database
  Home arrow Database arrow Page 3 - 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 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
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? 
DATABASE

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

    Table of Contents:
  • Database Storage with the ASP.NET Web Matrix
  • Create a database and table
  • Setting up a registration page
  • Coding the page
  • Error message
  • Password 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 - Setting up a registration page


    (Page 3 of 6 )

    Now let’s set up a registration page that will let users enter their username and password into a form that will insert their details into the logins table.

    Choose the New File button, highlight the ASP.NET Page template from the General Selection, and change the filename to something appropriate.  When the blank page loads, the Web Controls toolbox will be open by default.  From this toolbox, drag a label and a textbox onto the page.  Select the label, and in the properties pane on the right-hand side click into the Text value field.  Set the text to Username: and press return.

    Now select the textbox, and this time in the Properties pane, select the ID field value and enter txtUsername.  Using a prefix denoting the control type of the element and a meaningful name are standard practice in object oriented programming.  On this type of page it really makes little difference what the working elements of the page are called, but if you created a page with twenty text boxes on it, how useful would the ID TextBox15 be?  With the textbox still selected, press the right arrow key on the keyboard and then press return to get to the next line.

    Drag another label and textbox onto the page and set the Text and ID values to Password and txtPassword, then repeat the process once more and set the values to Verify Password: and txtPassword respectively.  It is standard practice on a registration page to check that the visitor knows for sure what the password is being set to.  When the two password boxes are different, you need to tell the visitor somehow without running the database INSERT function.  Add another label directly after the verify password text box and remove the default Text value.  Set the ID to lblPasswordError and chose a foreground colour of red.  This label will appear enclosed in square brackets on the design page to show that it has no text value.

    Go to a new line again and drag two button controls onto the page; set the ID of the first button to btnSubmit and the Text to Submit.  Now set the ID to btnClear and the Text to Clear.

    More Database Articles
    More By Dan Wellman


       · Hi,This article explores the first of the built in Code Wizards that allow you...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets





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