protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { Controllers.SubirPistaController obsubirPistaController = new Controllers.SubirPistaController(); DataSet dsConsulta = obsubirPistaController.getConsultarPistasController(); if (dsConsulta.Tables[0].Rows.Count > 0) { } else { throw new Exception { } }; } } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "Mensaje", "<script>swal('¡Error!', '" + ex.Message + "', 'error')</script>"); } }