protected void Acept_guar_Click(object sender, EventArgs e) { int id = int.Parse(Request.QueryString["id"]); AdminDB db = new AdminDB(); if (TextBox5.Text != "") { if (TextBox2.Text != "") { if (TextBox1.Text != "") { bool r = db.Actualizar_Profesor(TextBox1.Text, TextBox2.Text, TextBox4.Text, TextBox5.Text, int.Parse(TextBox3.Text), id); if (r == true) { Response.Redirect("Profesores.aspx"); } else { Label2.Text = "No se pudo guardar los cambios"; } } else { LabelNomE.Text = "Este campo es obligatorio"; } } else { LabelApeE.Text = "Este campo es obligatorio"; } } else { LabelMailE.Text = "Este campo es obligatorio"; } }