Hi,
I have created one login form having username and password ,I have restricted username as only number and password as special character ,length greater than 8,(a-z),(A-Z)these all should be there.i have created one LOGIN button ,I want to navigate to second page by clicking login button after validating these two field .
validation for password is not running properly ,I have used code as
<PasswordBoxx:Name="PasswordBox"
PasswordChanged
="PasswordBox_PasswordChanged">
privatevoidPasswordBox_PasswordChanged(objectsender,RoutedEventArgse)
{
PasswordBoxpassBox = senderasPasswordBox;
boolisValidPassword = passBox.Password.Any(char.IsDigit)
&& passBox.Password.Any(
char.IsLetter)
&& passBox.Password.IndexOfAny(
newchar[] { '@','$','#'}) != -1
&& passBox.Password.Length >= 8;
PasswordText.Text = isValidPassword ?
"valid":"not valid";
}
actually whenever I am entering wrong password that is not valid pwd then too on click of button page is getting navigated.How to write the code in c# for visual studio express 2012 for windows phone.so that after correct password only it shd navigate to second page.