1
Reply

shopping cart session issue

Abdul Shakoor

Abdul Shakoor

Jul 15 2015 2:24 AM
640
my shopping cart adds items to cart from different systems. can any one help me on this. 
Other users cart which is added from other system is visible in my system. 
Here is my shopping cart method
 
static ShoppingCart() {
if (HttpContext.Current.Session["ASPNETShoppingCart"] == null) {
Instance = new ShoppingCart();
Instance.Items = new List<CartItem>();
HttpContext.Current.Session["ASPNETShoppingCart"] = Instance;
} else {
Instance = (ShoppingCart)HttpContext.Current.Session["ASPNETShoppingCart"];
}
}

Answers (1)