Skip to content

Shopping cart session issue

Abdul Shakoor

Asked Jul 14, 2015, 10:24 PM EDT1 answer
Share
LinkedInX
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
 
C#
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"];
		}
	}

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 1 short reply
    • 0
      Thanks for share
      0