private void btnLogin_Click(object sender, EventArgs e) { try { bool authenticated = Authentication.AuthenticateClient(txtEmailId.Text.Trim(), txtPwd.Text.Trim()); if (authenticated) { OnAfterAuthentication(); } else { //lblStatus.Text = "Invalid Email Id or Password!!"; MessageBox.Show("Invalid Email Id or Password!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message + "\n" + ex.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); ExceptionHandler.HandleException(ex); } }