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..T oString().Trim( );
and SqlDataReader sdr = cmd.ExecuteRead er();
.......
if(str["Password"]==userpwd){}
.......
in the database, the password type is char(16)
I use text box to get user input
like sting userpwd = textbox.text..T oString().Trim( );
and SqlDataReader sdr = cmd.ExecuteRead er();
.......
if(str["Password"]==userpwd){}
.......
in the database, the password type is char(16)
Comment