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  
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? 
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 / 29
    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

    - Manage Projects with SQL Server Management S...
    - Query Editing and Regular Expressions with S...
    - Using SQL Server Management Studio Tools
    - SQL Server Management Studio
    - Exporting a MySQL Database to Excel Using OD...
    - Controlling Databases with SQL Server 2005 D...
    - Using Recovery Models with SQL Server 2005 D...
    - Handling Database Properties for the SQL Ser...
    - Managing Permissions with the SQL Server 200...
    - SQL Server 2005 Database Engine Security
    - Administering SQL Server 2005 Database Engine
    - Building Applications with Anonymous Types
    - A Closer Look at Anonymous Types
    - Programming with Anonymous Types
    - Converting Your Excel Worksheet into a Worki...





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek