Click here to Skip to main content
13,900,451 members
Click here to Skip to main content
Add your own
alternative version


34 bookmarked
Posted 9 Sep 2004

Login System (ASP.NET)

, 9 Sep 2004
Rate this:
Please Sign up or sign in to vote.
This is basically a Login system in ASP.NET using and javascript,ODBC using DSN method.This is my first code in I am new to ASP.NET.


Download sourcecode

Login System (ASP.NET)

This is basically a Login system in ASP.NET using and JavaScript.
I searched lots of site for "DSN" connectivity in But I couldn’t find a single site .So I feel to share this article or code among the developers.
I have used ODBC "DSN” method to connect with database.
And for validation I have used JavaScript, so the beginner in ASP.Net can learn how to use JavaScript in ASP.NET.
As I am new to ASP.NET, if you feel to leave any comment please.

This is my first article on login system in

  • What it does?
    This is an login system in using you can redirect a registered user to the protected area of your website.
  • Simple to integrate with your existing system
    This is very simple code. You can easily integrate wiht your existing .net site.
    You have to include this file in to your existing code or the file where you want to make login area.
    Database: For database you have to create a table in to your existing or new database call " tblAdmin"
  • Structure of the database
    FieldsName    Datatype
    sno          autonumber
    username          text
    pwd                  text

    After verifying the password you can easily redirect the user to the protected area of your website by modifying
    the redirect option in the file.
    You can also check the user if the user is logged in or not by session("whois"). If the value of this variable is blank then you can again redirect the user for login page.

The most important part of the code is DSN connectivity and Javascript to validate the form. I have searched lots of site about the DSN connectivity in ASP.Net but I couldn't find a single site on DSN method.
I have tried my own skills and get this code. So I want to share this article or code with other programmers who are looking for some information on DSN connectivity in and javascript using in

As I said earlier I am new to If there are any bugs or suggestions for improvements please let me know.I have updated this to prevent from "Sql Injections"

Login System in ASP.NET by Vipin Sharma. Visit me at

Vipin Sharma.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
India India
I specialise in the design and development of Internet and Intranet applications on Windows 2000
and Windows NT. The main tools and technologies I use are: Visual InterDev, FrontPage,HTML
Dreamweaver Active Server Pages (VBScript and JScript),Java Server Pages, JavaScript,
Visual Basic 6, Component Object Model (COM),DCOM SQL Server 7.0, ADO, Access 97, Oracle8i
Index Server,Visual Interdev 6.0.
I also have some experience in web development on WindowsNT and Access,Oracle.

You may also be interested in...


Comments and Discussions

GeneralMy vote of 1 Pin
Marco Bertschi6-Feb-13 4:16
protectorMarco Bertschi6-Feb-13 4:16 
GeneralMy vote of 1 Pin
TANicox25-Feb-12 5:45
memberTANicox25-Feb-12 5:45 
GeneralMy vote of 5 Pin
prabhusiva1718-Jul-11 2:32
memberprabhusiva1718-Jul-11 2:32 
Questionhow do you configure a mysql server Pin
Katamba Raymond12-Feb-11 7:49
memberKatamba Raymond12-Feb-11 7:49 
GeneralMy vote of 1 Pin
ATUL DHIMAN26-Oct-10 22:18
memberATUL DHIMAN26-Oct-10 22:18 
GeneralMy vote of 1 Pin
jeganssnit5-Aug-10 19:04
memberjeganssnit5-Aug-10 19:04 
GeneralDSN info Pin
Mr Pack17-Jul-07 4:51
memberMr Pack17-Jul-07 4:51 
GeneralLittle but very good for beginners Pin
Tahir Naeem16-Mar-05 1:05
memberTahir Naeem16-Mar-05 1:05 
GeneralNot Secure - SQL Injection Attacks Pin
10-Sep-04 5:38
suss10-Sep-04 5:38 
GeneralRe: Not Secure - SQL Injection Attacks Pin
vipinsharma10-Sep-04 20:20
membervipinsharma10-Sep-04 20:20 
GeneralRe: Not Secure - SQL Injection Attacks Pin
11-Sep-04 4:30
suss11-Sep-04 4:30 
GeneralRe: Not Secure - SQL Injection Attacks Pin
Colin Angus Mackay27-Sep-04 10:17
memberColin Angus Mackay27-Sep-04 10:17 
GeneralLow votes Pin
Paul Watson9-Sep-04 21:38
sitebuilderPaul Watson9-Sep-04 21:38 
GeneralRe: Low votes Pin
vipinsharma9-Sep-04 22:31
membervipinsharma9-Sep-04 22:31 
GeneralRe: Low votes Pin
WillemM10-Sep-04 3:38
memberWillemM10-Sep-04 3:38 
GeneralRe: Low votes Pin
Colin Angus Mackay10-Sep-04 9:36
memberColin Angus Mackay10-Sep-04 9:36 
GeneralRe: Low votes Pin
vipinsharma10-Sep-04 19:44
membervipinsharma10-Sep-04 19:44 
GeneralRe: Low votes Pin
Colin Angus Mackay10-Sep-04 22:38
memberColin Angus Mackay10-Sep-04 22:38 
GeneralMore work needs done. Pin
Colin Angus Mackay11-Sep-04 3:56
memberColin Angus Mackay11-Sep-04 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190306.1 | Last Updated 10 Sep 2004
Article Copyright 2004 by vipinsharma
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid