Exemple #1
0
        public ActionResult RemoveFromCart(int albumId)
        {
            MyCart myCart = Session["cart"] as MyCart;

            myCart.RemoveFromcart(albumId);
            Session["cart"] = myCart;
            return(Json(new
            {
                CartButton = RenderRazorViewToString("_CartButton", null),
                CartTable = RenderRazorViewToString("_CartItems", myCart.CartItems).ToString()
            }, JsonRequestBehavior.AllowGet));
        }