How password be case sensitive?
-
Dear all.. I have a login form, when I click the submit button, the code checks the users name and the password in the database if it is available, but it checks the password without its case(e.g.: the string "nour" is similar to the string "NOUR") How can I control the password to be case sensitive? Regards.. Nour Abdel-Salam
-
Dear all.. I have a login form, when I click the submit button, the code checks the users name and the password in the database if it is available, but it checks the password without its case(e.g.: the string "nour" is similar to the string "NOUR") How can I control the password to be case sensitive? Regards.. Nour Abdel-Salam
Hi, One solution may be retriving the password from the db and check the password in the code level.
Mehedi Hasan
-
Dear all.. I have a login form, when I click the submit button, the code checks the users name and the password in the database if it is available, but it checks the password without its case(e.g.: the string "nour" is similar to the string "NOUR") How can I control the password to be case sensitive? Regards.. Nour Abdel-Salam
Hi, int result = string.Compare(txtPwd.Text,strdbPwd,false); Here false means accept case sensitive true means ignore case sensitive
Kiran Kumar.CH (MCP)
-
Dear all.. I have a login form, when I click the submit button, the code checks the users name and the password in the database if it is available, but it checks the password without its case(e.g.: the string "nour" is similar to the string "NOUR") How can I control the password to be case sensitive? Regards.. Nour Abdel-Salam
If you are using Sql Server, you could always cast the passwords to Varbinary and compare them.
SELECT ...
FROM UserList
WHERE UserName = @UserName AND
CAST(Password AS VARBINARY(30)) = CAST(@Password AS VARBINARY(30))the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
If you are using Sql Server, you could always cast the passwords to Varbinary and compare them.
SELECT ...
FROM UserList
WHERE UserName = @UserName AND
CAST(Password AS VARBINARY(30)) = CAST(@Password AS VARBINARY(30))the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
Hi, int result = string.Compare(txtPwd.Text,strdbPwd,false); Here false means accept case sensitive true means ignore case sensitive
Kiran Kumar.CH (MCP)