Database
  Home arrow Database arrow Page 5 - 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: Simple Login Page
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2005-09-21

    Table of Contents:
  • Database Storage with the ASP.NET Web Matrix: Simple Login Page
  • Start with the Properties pane
  • Switch to the Code view
  • Encrypting the password
  • Do you want to use a template?

  • 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: Simple Login Page - Do you want to use a template?


    (Page 5 of 5 )

      

     The Web Matrix does provide a login page template under the Security templates section, but I thought that creating the page manually may help to promote a fuller learning experience.  If you create a new page from this template, you will see that in the Loginbtn_Click event handler that comes as part of the template, a line of code that reads:

    FormsAuthentication.RedirectFromLoginPage(UserName.Text, true)

    This line of code would be used instead of the Welcome message we created.  What this does is either redirect the user to the page that the user was on before the login page, or redirect them to their default page.  The second parameter of the method states whether a session persistent cookie should be created or not.  I have left this out of this tutorial because so far, all we have is a registration page and a login page; there is no default page that you could be redirected to!

    So far, you have seen how easily and quickly pages can be created with the power to insert and read data to and from a database.  The next articles will describe how the Web Matrix can be put to the task of removing and updating data from  a database, so pretty soon, you should have a good understanding of just what can be achieved with a data-driven ASP.NET site.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hi everybody, this is the second in a so far four part series exploring the built...
     

    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 5 hosted by Hostway