1protected string GetCartString()
2 {
3 HttpCookieCollection hc = new HttpCookieCollection();
4 hc = Request.Cookies;
5 string ItemsQuantity = "";
6 foreach (String sc in hc)
7 {
8 HttpCookie c = hc[sc];
9 ItemsQuantity += c.Value.ToString().Trim() + ",";
10 }
11
12 //trim end comma
13 if (ItemsQuantity.Length > 0)
14 ItemsQuantity = ItemsQuantity.Substring(0, ItemsQuantity.Length - 1);
15
16 return ItemsQuantity;
17 }