Advertisement
mariussm

formssignin.aspx.cs-1

Aug 30th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. protected void SubmitButton_Click( object sender, EventArgs e )
  2. {
  3.     try
  4.     {
  5.         if(!PINTextBox.Text.Equals("12345")) {
  6.             ErrorTextLabel.Visible = true;
  7.             ErrorTextLabel.Text = "Wrong PIN"
  8.             return;
  9.         }
  10.        
  11.         // PIN was ok, let's continue with SignIn
  12.         SignIn( UsernameTextBox.Text, PasswordTextBox.Text );
  13.     }
  14.     catch ( AuthenticationFailedException ex )
  15.     {
  16.         HandleError( ex.Message );
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement