I am using asp.net(C#) to build a login sys. I use the SqlDataReader to get the data from the data base to validate the user. but it always comes the password dosn't matches. but I tested to print the password get from the database and user input on the page, they are the same. can any one tell me why?
I use text box to get user input
like sting userpwd = textbox.text..ToString().Trim();
and SqlDataReader sdr = cmd.ExecuteReader();
.......
if(str["Password"]==userpwd){}
.......
in the database, the password type is char(16)