Click here to Skip to main content
15,911,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello sir/madam,

how to store login details like username and password in database i.e in sqlserver.
if the user is already exists then it has to be login and show the page.if user does not exit then it has to show msg.and if want want to create a new user login details, then we have to create it and that new login detais also has to be store in backend sqlserver
Posted

Hi,
Click Here[^]
 
Share this answer
 
 
Share this answer
 
Create the database with this http://msdn.microsoft.com/en-us/library/ms229862(v=vs.80).aspx[^]
Then use ASP.NET membership provider
 
Share this answer
 
Basic Question. This is login functionality of any project.
you can customize you code or use readymade controls of asp.net. check out, ASP.NET login controls[^]

Before storing your username and password to database you can encrypt with different security algorithms. Use a cryptographically secure random number generator.
you can take help of this article. The Art & Science of Storing Passwords[^]
 
Share this answer
 
VB
//first check a user nmae in table after insert
//this is sample code for checking username available
// u write code for txtname_textchanged event for (check user name available) 
dim sql as string=string.empty
dim result as integer
dim conn as new sqlconnection="connection string"
sql="select count(*) username from table where username='" &txtname.text &"'"
with cmd
.connection=conn
.commandtype=command.text
.commandtext=sql
.selectcommand
end with
i=cmd.executescalar(sql)
if i=0 then
//this area for new  insert usernmae and password
else
msgbox("user name already available")

end if
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900