How to validate ASP password login form?

I have an ADO.Net login form as my interface and I want to check if the username and password match the user with the correct values ​​in the database. How can I accomplish this as easily as possible?

By the way, my user data table in the database is called Login.

0


source to share


3 answers


  • Do not store a plain text password in the database. Never.
  • ASP.NET login form has OnLogin or something similar. You need to attach a method to it.
  • Query the database for the credentials of the user trying to log on. I.e:

SELECT * FROM LOGIN WHERE USERNAME = @P_USERNAME;



Then you compare the password you got from the database with the password entered by the user and you're done.

+3


source


Use a membership provider instead . What the input control is used for.



Bruno Figueiredo

0


source


For the smallest lines of code, use forms authentication and asp input management:

http://msdn.microsoft.com/en-us/library/ms178331.aspx

0


source







All Articles