protected void Button1_Click(object sender, EventArgs e) { ManejoSql cls = new ManejoSql(); bool r; r = cls.guardardatos(TextBox1.Text, TextBox2.Text, Int32.Parse(TextBox3.Text), TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text); if (r == true) { //Response.Write("<script language =javascript>alert('Registro exitoso');</script>"); Response.Redirect("Login.aspx"); } else { Response.Write("<script language =javascript>alert('Registro fallido');</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { ManejoSql cls = new ManejoSql(); if (TextBox3.Text != "" && TextBox4.Text != "") { EntUsuario obj = cls.Login(TextBox3.Text, TextBox4.Text); if (obj != null) { Session["usuario"] = obj; Response.Redirect("Report.aspx"); } else { Label3.Text = "Usuario o contraseƱa invalido"; Label3.Visible = true; } } else { Label3.Text = "Faltan ingresar campos"; Label3.Visible = true; } }