Link to home
Start Free TrialLog in
Avatar of jj819430
jj819430

asked on

strange Password Textbox problem

I have a form with a username and password field,.

the user fills it in on th aspx page. I pass it to a cs class that handles the checks, but for some reason even though the string is precisely the same, if is not coming up as equal.

the form has the following:

Username
Password
(both are textboxes) Password is in password mode;
compare(Password.Text,Username.Text);

public void compare(string password, string username)
{
string myUsername = "foo";
string myPassword = "boo";
If(Username == myUsername && Password == myPassword)
{
return true;
}
return false;
}
ASKER CERTIFIED SOLUTION
Avatar of esteban_felipe
esteban_felipe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yup :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jj819430
jj819430

ASKER

I ended up just fiddling with it and getting it to work. Will split the points.