Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string categoryId = Request.QueryString["categoryId"];

            if (!string.IsNullOrEmpty(categoryId))
            {
                // process Home Page link
                HtmlAnchor lnkHome = new HtmlAnchor();
                lnkHome.InnerText = "Home";
                lnkHome.HRef      = "~/Default.aspx";
                plhControl.Controls.Add(lnkHome);
                plhControl.Controls.Add(GetDivider());

                // Process Product page link
                HtmlAnchor lnkProducts = new HtmlAnchor();
                lnkProducts.InnerText = WebUtility.GetCategoryName(categoryId);
                lnkProducts.HRef      = string.Format(PRODUCTS_URL, categoryId);
                plhControl.Controls.Add(lnkProducts);
                string productId = Request.QueryString["productId"];
                if (!string.IsNullOrEmpty(productId))
                {
                    // Process Item page link
                    plhControl.Controls.Add(GetDivider());
                    HtmlAnchor lnkItemDetails = new HtmlAnchor();
                    lnkItemDetails.InnerText = WebUtility.GetProductName(productId);
                    lnkItemDetails.HRef      = string.Format(ITEMS_URL, categoryId, productId);
                    plhControl.Controls.Add(lnkItemDetails);
                }
            }

            // Add cache dependency
            this.CachePolicy.Dependency = DependencyFacade.GetItemDependency();
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //get page header and title
     Page.Title = WebUtility.GetProductName(Request.QueryString["productId"]);
 }