protected void btnSalir_Click(object sender, EventArgs e)
 {
     txtEscribir.Text   = string.Empty;
     lblValidacion.Text = string.Empty;
     btnValidar.Enabled = true;
     comprobarPuntuaciones();
     EsLogado.SetActiveView(Logado);
 }
 protected void btnEjercicios_Click(object sender, EventArgs e)
 {
     if (dtEjercicios == null)
     {
         SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["AprendeCoreanoConnection"].ConnectionString);
         SqlCommand    cmd  = new SqlCommand("SP_SELECT_EJERCICIOS", conn);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add("@Id_Coleccion", SqlDbType.Int).Value = Int32.Parse(cboColecciones.SelectedValue.ToString());
         conn.Open();
         dtEjercicios = new DataTable();
         dtEjercicios.Load(cmd.ExecuteReader());
         conn.Close();
         Session["dtEjercicios"] = dtEjercicios;
         iEjercicio         = 0;
         txtiEjercicio.Text = "0";
     }
     lblNuevaColeccion.Text = string.Empty;
     EsLogado.SetActiveView(Ejercicios);
     prepararEjercicio();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["usuarioLogado"] == null || Session["usuarioLogado"].ToString() == string.Empty)
     {
         EsLogado.SetActiveView(Anonymous);
     }
     else
     {
         iEjercicio = Int32.Parse(txtiEjercicio.Text);
         if (!IsPostBack)
         {
             EsLogado.SetActiveView(Logado);
             llenarCboColecciones();
             Session["dtEjercicios"] = null;
         }
         else
         {
             if (Session["dtEjercicios"] != null)
             {
                 dtEjercicios = (DataTable)Session["dtEjercicios"];
             }
         }
     }
 }