ASP.NET Tutorial 6- Create a Login website - Login page & Validating User and Password in database

ASP.NET Tutorial 6- Create a Login website - Login page & Validating User and Password in database


asp.net login validation with database
c# - Validating username and password in a database in asp.net
Validating User Input in ASP.NET Web Pages Sites
Asp.Net Examples: Simple login form example in asp.net
How to create Login page/form and check username,password in database
Simple login form example in asp.net Check Username
How to implement form validation using ASP.Net 2.0
How to Validate User Login in asp.net using DataSet
ASP.NET Form to Database with Form Validation
ASP.NET Database Login
ASP.NET FormDecorator Demo - Validation and Login Controls
Closed Caption:

hello guys welcome once again in the
last few videos I have been showing you
how to make a registration page in
asp.net and how to link it with the
database now in this video I will show
you how to make a login page which
verifies the username and password from
the database and then redirect you to
the secure access page which you want to
show after the login
so let's get started by creating the
login page first of all
so we go to my project right leggett and
i will say the add new item and we show
me this dialog box
i will choose rap form and i will say
this is my login form so login dot aspx
and i will say add and once again this
is a blank form so i will say this will
be my login page and i can change the
font also
first of all I may get bored and i will
say they should be extra large 36 eating
ok and I can also change the
justification or justify:center so this
will always be in the center now we are
having our heading
now we will add a table to our page so i
will say in third table this time also
we will take three columns and let's
take four rolls and click OK and first
of all I will say use a name
second role will be password and ok for
now we are ok with this
so i will select this and this both the
rules and
and I will say justify right now I will
go to my standard tool box and i will
take our text box here and expose for
the password
ok now i have both the text boxes i
select both xboxes and i will say with
equal to 18
p PX property is wrong because this
should be 0
okay now this is done now i will take
our validation tool this all this thing
i have also shown you in the
registration form so i will just make it
a little bit faster
I will take a required field really data
one and two and i will change the text
so we go
select my required real value data and i
will change the error message as please
and the user name and second is a second
error message is leave and possible
ok
I have both the things I would change
first of all the ID of this text box so
i know which text box i'm talking about
first text box name is use a name
textbox user name and sex its second
text box ID is text box
password ok now i'm done with that i
will link my quite feel validated with
this text box so i will select Myra
quite valid data and haven't say control
to validate and i won silver choose text
box username from here and second
required field validate of a password
i will choose controlled validated will
be my text box password and here i will
select my password field and i will say
that text mode of this is password
so your character doesn't show once that
this is done I will take our button from
my standard tool box and I'll say this
will be my lord
again button and i will change also the
ID button under school logging
ok so now we are ready with our login
page you can just also change the font
size of these two also
so i will select my required field valid
data I mean go to the 44 color and i
will say rider
okay now this is done once your login
page is designed just like your login
button and double click it and first of
all I will add here using system . data
. SQL client . SQL client
ok and second is i will add a second
namespace cell system . configuration
ok now once you are done with that
let's try and write the court for this
button login click event support that
what i will do is whatever code i have
written for the registration page for
the database connection
i will copy and paste it here also
because it will be the same more or less
the same
not exactly the same so i will just copy
whatever i have written in page load
event
ok I'm not copying button click event
code which I've written for database but
I am copying this page load event and
accept
are inside this if if was back on
condition that we copy this when you go
through the court also so don't worry if
you haven't seen it and I will go to my
local login dot aspx . CS form and i
will paste my cornea
let me make it a little bit wider and
bigger
so you will be able to see it so first
of all I will just declare my
sqlconnection corn is equal to new
sqlconnection and i will say as an
argument i'll pass configuration manager
. connection strength and in the square
bracket
i'm passing my registration connection
string which this is the connection
string poem from the my database if you
have some confusion you
you can see my previous videos and you
will be able to know what this
registration connection string is and
after the square record just right .
connection string and close the bracket
and now we will open our connection with
the database or lower right corner .
open and in the next line we prepare our
weary
so i will write string check user is
equal to and this is the freddie which
we have let me open this server Explorer
so we will see the database also at the
same time
so i will write here
select count and in the bracket amis say
stars from my table name so this is my
table name from the database where
username is equal to
now it will take some time to open
so whatever
to show you in the solution explorer but
we have made at this table called the
user data in the earlier videos and it
has five column ID username email
password and country right
so what are ready i'm writing is select
count in the bracket star from my table
in which of this where username which is
this column name is equal to whatever i
enter in the user name text box
so now my user name text box is little
bit different in the login form so i
will select my user name text box and i
will copy my xbox ID and i will paste it
here so we remove the error so right
where username is equal to a single
caught in between double coat last plus
and then write this text box or text
ok and in the next video I will prepare
a command so light s kill come on .
which is formed the object name is equal
to new missile command and I will pass
Mike ready as the first argument and
second argument is the connection with
the database now i will write into stem
is equal to convert .
- n 22 and the argument right calm which
is this comm . and he could play in the
. to strength and I will close my
connection
ok and earlier what we are doing is if
the user already exists then we say user
already angriest ok now this time what
we will do is inside the stamp is equal
to 1
we will write the code once again for
verifying the username and password
so let's try and code
the user login code
so what i will write here is first of
all I will open the connection once
again so i will write gone not open and
in the second line
I will make my crazy so I right string
I won't say check password ready for
example long name is equal to and double
port and the McCallum and in here i will
write the query we say select possible
from my table name which is user
daughter where my username is equal to
whatever i enter in the text box i will
copy just the same chord and i will
paste here instead of this
ok so Mike where he looks like this and
in the next line
what i will do is i will just copy this
has truly command and i will paste it
here and instead of this ready i will
just to replace this ready by this and
are we change the constant comm come on
name so i will say path calm now
ok this is done now what I will do is I
will write in the next line
string because we are verifying the
string and then we will say pass
Ward is equal to and then i will say
every copy my password command . execute
Kayla
. to string
ok once this is done then between pass
the aura password in this string from
the square is whatever username you
right here in the text box it will
search in the database and it will find
the password and then it will give you
in this string because we are saying the
select password from the user table
right
ok now in the next line we will verify
the password from the password which you
will use their health entered in the
password text box
so what i will do is i will you give our
if condition if I'm let me close
brackets and i would say if my password
we took this password is equal to the
password which user has entered the soul
I will just select my password text
field and i will copy my ID for the text
speed text field for the password and
then i will say text box password . text
so if this password matches the password
which user has entered that means our
password is correct right so here we
will say
response . right and we will see
possible
first of all double coat and then i will
say pass word is correct
ok so once this is done we know that our
password is correct right and if this is
not the case then we will write else
I mean give the response
password is not correct right so i will
just copy response not right and I will
say the password is not correct
and after this if condition where we
have written if temp is equal to 1 we
will say he also else and we will make a
bracket and here also we will give the
response that if user name is not
present
so you say use
the name is not going so well right
username is not correct
ok so once this all is done let me make
a new session also after the login is
correct your login is correct
the stride fashion and the square record
right
nu is equal to and
whatever is your text box for the user
name ID is the text box
username . text
ok so now this is done I think this will
work
this code is now done so let's try and
run the program so i will run my program
from here or I will go to my login page
and i will write like it and i will say
you in the browser so right click and
view in browser and i will say yes I
want to save the doctor and it opens my
login page
hopefully no I rockers ok so there is no
error
let me see what that i have in the
database so we go to my solution
Explorer i will write like my table and
say show table doctor and you
show me the part of which is there in
the table so I have a username admin and
with respect to the admin i have the
password 12345
so let me enter this username admin so
I'm lined admin and the password is one
two three four five and i will say log
in and it's saying password is not
correct
why it's saying this i have absorbed
some times when you enter your username
and password it
this string password has some spaces
unwanted spaces which you don't want
so just right here string password is
going to password . execute scalar . to
string and just right after this to
string . right to the place
under what we are going to replace is we
are going to replace all the single
spaces with no space right so just write
double coat and give us space and in the
second argument just right
no space ok now once again right click
and you in the browser
yes and this time i will say my username
and is admin and password is 1234
why why it's not in turn i will say 1 2
3 4 5 & 7 login and now you can see my
password is correct
okay so some time this phenomena comes
if this phenomenon comes you need to
replace all the spaces with nor spaces
ok let's try some other user name and
password for example mark which have the
same password
let's try it for this Julie and four
times three
ok let's try username and the password
3333 I'll say long and he says password
is correct that we entered the wrong
password so i will lend us some random
password and our login and this time it
says password is not correct
let me not enter anything in the
password field and it says please enter
the password a nice and nothing in the
username
it is please enter the username
what next you can do is one more thing
you can do if you are
password is correct you can redirect
your user to the new page
so for example I've write this . start
redirect and for example this is an
example i will create or you can create
a new page which is exclusively for the
login user so i will say double code and
select any page for example manager so I
lied manager . is DX and let me try and
run the program once again
view in browser and username admin
password is one two three four five
and when i log in it we need me or
redirect me to the new bid so let's try
and you can see there is manager page
so in this page you can design your own
data which is
which the only logon user can see
ok so now i have shown you how to log in
or create a login paid and how to log in
with the verification of user name and
password
I hope you enjoyed this video please
rate comment and subscribe and bye for
now

Video Length: 22:58
Uploaded By: ProgrammingKnowledge
View Count: 300,093

Related Software Products
Web Log DB
Web Log DB

Published By:
ExactTrend

Description:
The Web Log DB exports web log data to databases via ODBC. Web Log DB uses ODBC to export data from raw log files to your database, using SQL queries. Web Log DB allows you to use the applications you have become accustomed to such as MS SQL, MS Excel, MS Access etc. Also, any other ODBC compliant application can now be used to produce the output you desire. Use Web Log DB to perform further analysis in special softs. Web Log DB supports more than 25 log file formats. It was tested with all ...


Related Videos
Create Login Form Access Database Part 1
Create Login Form Access Database Part 1

Create Login Form Access Database Part 1 Download sample Access file at : http://www.iaccessworld.com/?p=1304 ==========Attention!! Please================== There was an error on some code. you can fix it by combining criteria LoginID and Password in one criteria under one DLookup. The fixed code is "If (IsNull(DLookup("[UserLogin]", "tblUser", "[Userlogin] ='" & Me.txtLoginID.Value & "' And password = '" & Me.txtPassword.Value & "'"))) Then msgbox ...
Video Length: 15:25
Uploaded By: austin72406
View Count: 467,416

Java prog#3. Login Program for java with sqlite [ Mysql ] database PART-1
Java prog#3. Login Program for java with sqlite [ Mysql ] database PART-1

Donate to ProgrammingKnowledge -- (https://www.paypal.com/de/cgi-bin/web...) JPasswordfield The sql connect jar file can be downloader form this link below Creating Login Page In Java using NetBeans code for login using netbeans Java Netbeans Login Building a Login Screen for a NetBeans NetBeans Platform Login Tutorial create login page contain user id,password,buttons in java using netbeans NetBeans Platform Login ...
Video Length: 10:01
Uploaded By: ProgrammingKnowledge
View Count: 336,718

ASP.NET Tutorial 3- How to Create a Login website - Creating Database For website
ASP.NET Tutorial 3- How to Create a Login website - Creating Database For website

Setting up the Database ASP.NET Site Building ASP.NET Web Applications with ASP.NET Web Pages Databases ASP.NET Web Forms Tutorial After creating Website using ASP.NET (c#), sqlserver(Database SQL server DAtabase Creating a Database ASP.NET Web Pages Tutorial Create a Database Application in 15 Minutes with ASP.NET Create a website with ASP.Net Create an ASP.NET website ASP.NET Web Pages Databases ASP.NET Web Forms Database
Video Length: 13:42
Uploaded By: ProgrammingKnowledge
View Count: 311,880

ASP.NET Tutorial 4- How to Create a Login website - Connecting Database to Registration Page
ASP.NET Tutorial 4- How to Create a Login website - Connecting Database to Registration Page

ASP.NET Database Connection ASP.NET Web Forms Database How to connect asp.net to a database Creating sql database connection in asp.net web application How to make database connectivity in asp.net Make connection to database in ASP.NET c# - asp.net database connection connect jqgrid to database using WebSecurity.InitializeDatabaseConnection() to CREATE DATABASE permission denied in database How to connect asp.net to a databasebr ...
Video Length: 25:50
Uploaded By: ProgrammingKnowledge
View Count: 285,534

Login system using PHP with MYSQL database
Login system using PHP with MYSQL database

In this video, i create a table users with fields id, username and password. Then i inserted a user whose credentials i used to login.
Video Length: 18:30
Uploaded By: Awa Melvine
View Count: 249,133

PHP Tutorials: Register & Login (Part 1): Database
PHP Tutorials: Register & Login (Part 1): Database

Download the full series and complete source code at https://phpacademy.org/course/registe... Setting up the database table for our users, so we can store their information. This will allow us to process their login using their username and password, and store any additional information about them. Register & Login series playlist is available at: http://www.youtube.com/playlist?list=... Official website http://phpacademy.org Support Forumbr ...
Video Length: 08:58
Uploaded By: Codecourse
View Count: 249,076

Netbeans Java Login Application + MySQL
Netbeans Java Login Application + MySQL

Tutorial Java Netbeans Login Application with MySQL database
Video Length: 28:48
Uploaded By: Fajar Sebastian
View Count: 150,771

ASP.NET Web Forms website Part 1 - Connect with MySQL database connection
ASP.NET Web Forms website Part 1 - Connect with MySQL database connection

ASP.NET Website creation example using some limited HTML, ASP.NET tags, C# code files, and connecting to a MySQL database. Here I did a step by step demonstration on how to create a semi functional ASP.NET Website. There's no heavy emphasis on HTML, there is no CSS, however I do show how to add textboxes, buttons to a web page and then tie the web application to MySQL Database for authentication. If you want to see how to harden the Web Forms login page against SQL ...
Video Length: 45:40
Uploaded By: Chris Duran
View Count: 119,193

Login form in Netbeans and MySQL as Database
Login form in Netbeans and MySQL as Database

Log-in using user name and password stored in the database. For jdbc jar file Open the link and click on download link : http://dev.mysql.com/downloads/file.php?id=13598
Video Length: 12:32
Uploaded By: CoderNut Tutorials
View Count: 104,746

C# MS Access Database Tutorial 2 # Create Login Form with Microsoft  Access Database
C# MS Access Database Tutorial 2 # Create Login Form with Microsoft Access Database

Login Program for C# with MS Access Database Access Login Database - Microsoft Access How To Make A MS Access Login Form How to create login form in Microsoft Access 2010, 2007 Visual C# - Login Form Tutorial Microsoft Access c# - How can I close a login form and show the main form Login Form using C# and SQL Microsoft Access C# Login Form with MS Access Login Form using c# and ms access as database..?‎ closing Login form after a successful ...
Video Length: 24:20
Uploaded By: ProgrammingKnowledge
View Count: 95,174

Copyright © 2025, Ivertech. All rights reserved.