protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); try { dgvPokemons.DataSource = negocio.listar3(); dgvPokemons.DataBind(); } catch (Exception ex) { Response.Redirect("Error.aspx"); } }
private void cargarGrilla() { //listaPokemons = new List<Pokemon>(); PokemonNegocio pokemonNegocio = new PokemonNegocio(); try { listaPokemons = pokemonNegocio.listar3(); dgvPokemons.DataSource = listaPokemons; ocultarColumnas(); RecargarImg(listaPokemons[0].UrlImagen); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); try { lista = negocio.listar3(); //Session.Add("nombre", "maxi"); //Session["algo"] = "ñañañ"; Session.Add("listadoPokemons", lista); } catch (Exception ex) { Session.Add("Error", ex.ToString()); Response.Redirect("Error.aspx"); } }