protected void Button1_Command(object sender, CommandEventArgs e) { if (e.CommandName == "eventoClick") { NegocioSession vs = new NegocioSession(); string text = e.CommandArgument.ToString(); string id1 = text.Split('-')[0]; string des = text.Split('-')[1]; string nombre = text.Split('-')[2]; vs.AgregarCarrito((DataTable)this.Session["carrito"], id1, nombre, des); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Alias"] != null) { HyperLink3.NavigateUrl = "~/YaMaquetado/Cuenta.aspx"; lblMensaje.Text = Session["Alias"].ToString(); } if (this.Session["carrito"] == null) { this.Session["carrito"] = NegocioSession.CrearCarrito(); } if (!IsPostBack) { Panel1.Visible = false; } }