protected void btnResetPwd_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtResetPwd1.Text) && !string.IsNullOrEmpty(txtResetPwd2.Text)) { if (txtResetPwd1.Text != txtResetPwd2.Text) { alertmessage.SetMessage(AlertID.WARNING, "Passwords did not match"); } else { UsersViewModel viewModel = new UsersViewModel(); viewModel.ViewModelEvent += viewModel_ViewModelEvent; viewModel.ResetPassword(hfResetPwdHiddenField.Value, txtResetPwd2.Text, WebSessionHandler.SelectedCompanyCode); AuditGlobal.AddAudit(WebSessionHandler.SelectedCompanyCode, WebSessionHandler.Username, ActionID.ResetPassword, hfResetPwdHiddenField.Value); } } }