method 1:
first make conenction with databse
then use the command like
select * from table name where username = "textboxvalue"
check if it return any row by properties like
dr.Hasrows
it will contain row if the username is in database
following is the code to authenticate username and paswd
Command.Connection = Connection
Connection.Open()
command.CommandText = "select * from login where username='" + txtusername.Text + "' and passwd='" + txtpassword.Text + "'"
dr = Command.ExecuteReader
dr.Read()
If dr.HasRows = True Then
"allow inside"
else
"display error"
end if
method 2:
first create a connection with the database
then use the statement like
select username from table name
save the username return from the table in a array format
then match it with the user name which the user type in the text box
if matches allow inside
else
display error msg
my email id is
[email protected]