protected void btnActualizar_Click(object sender, EventArgs e) { Producto p = new Producto(); char activado = 'T'; if (rdoInactivo.Checked) { activado = 'F'; } bool actualizado = p.ActualizarProductoSQL(txtId.Text, txtNombre.Text, txtCantidad.Text, txtDescripcion.Text, activado, txtPrecio.Text, ddlCategoria.SelectedItem.ToString()); if (actualizado) { Response.Redirect(Request.RawUrl); } else { Response.Write(@"<script language='javascript'>alert('Problemas! el producto no pudo ser actualizado.');</script>"); } btnActualizar.Visible = false; }