protected void Delete_Item(object sender, EventArgs e)
        {
            LinkButton selectedLink = (LinkButton)sender;
            string     link         = selectedLink.ID.Replace("del", "");
            int        cartId       = Convert.ToInt32(link);

            var repo = new CartRepo();

            repo.DeleteCart(cartId);

            Response.Redirect("~/Pages/ShoppingCart.aspx");
        }
Example #2
0
 public void DeleteCart(string acc)
 {
     _cartRepo.DeleteCart(acc);
 }