public ActionResult Product(string category)
        {
            // Check if a category was passed in first.
            if (!string.IsNullOrWhiteSpace(category))
            {
                // Retrieve the products for the category
                ProductLogic productLogic = new ProductLogic();
                List<ProductDetail> productDetails = productLogic.GetProductDetailByCategory(category);

                // Loop through the results and add to our model
                List<ProductModel> productModel = new List<ProductModel>();
                foreach (ProductDetail product in productDetails)
                {
                    productModel.Add(new ProductModel
                    {
                        ImageDescription = product.ProductDescription,
                        ImageUrl = product.ImageUrl
                    });
                }

                // Return the populated model to the view
                return View(productModel);
            }

            // Incorrect parameters were passed in, so return nothing.
            return View();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Get the category from the querystring
            string category = Request.QueryString["category"];

            // Check if we received a category
            if (!string.IsNullOrWhiteSpace(category))
            {
                // Display the images
                List<ProductDetail> productsForCategory = new List<ProductDetail>();
                var profiler = MiniProfiler.Current;
                using (profiler.Step("Retrieve Products"))
                {
                    ProductLogic productLogic = new ProductLogic();
                    productsForCategory = productLogic.GetProductDetailByCategory(category);
                }

                using (profiler.Step("Build HTML"))
                {
                    // Loop through each product and build the HTML that we are going to
                    // return to the web page
                    foreach (ProductDetail product in productsForCategory)
                    {
                        phProductImages.Controls.Add(BuildHtml(category, Utils.CdnUtils.CdnUrl(product.ImageUrl), product.ProductDescription));
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Get the category from the querystring
            string category = Request.QueryString["category"];

            // Check if we received a category
            if (!string.IsNullOrWhiteSpace(category))
            {
                // Display the images
                ProductLogic productLogic = new ProductLogic();
                List<ProductDetail> productsForCategory = productLogic.GetProductDetailByCategory(category);

                foreach (ProductDetail product in productsForCategory)
                {
                    phProductImages.Controls.Add(BuildHtml(category, Utils.CdnUtils.CdnUrl(product.ImageUrl), product.ProductDescription));
                }
            }
        }