protected void BtnAlterar_Click(object sender, EventArgs e) { MODUsuario usuario = new MODUsuario(); Criptografia cripto = new Criptografia(); EnviaEmail enviaEmail = new EnviaEmail(); string senha = ""; bool senhaForte = ValidaSenhaForte.ValidaSenha(TxtSenha.Text.Trim()); if (senhaForte == false) { LblResposta.Text = Erros.SenhaFraca; } else if (TxtSenha.Text.Trim() == "" || TxtSenha.Text.Length > 12) { LblResposta.Text = Erros.SenhaVazio; } else { try { senha = TxtSenha.Text.Trim(); usuario.Senha = cripto.criptografia(senha); usuario.Login = Page.Request.QueryString["login"]; BLLUsuario.AlterarSenha2(usuario); LblResposta.Text = "Senha alterado com sucesso!"; } catch (Exception) { Response.Write("<script>alert('Erro ao inserir!');</script>"); throw; } } }