We help IT Professionals succeed at work.

strange Password Textbox problem

jj819430
jj819430 asked
on
222 Views
Last Modified: 2010-04-15
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;
}
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
yup :)
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I ended up just fiddling with it and getting it to work. Will split the points.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.