protected void Page_PreRender(object sender, EventArgs e) { using (ShoppingCartActions usersShoppingCart = new ShoppingCartActions()) { string cartStr = string.Format("Cart ({0})", usersShoppingCart.GetCount()); cartCount.InnerText = cartStr; } using (WishlistCartActions usersWishlistCart = new WishlistCartActions()) { string wishStr = string.Format("WishList ({0})", usersWishlistCart.GetCount()); wishCount.InnerText = wishStr; } }