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"); }
public void DeleteCart(string acc) { _cartRepo.DeleteCart(acc); }