Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.HeaderText = "About Us";

            Master.AddBreadcrumbLink("/Order.aspx", "Home");
            Master.AddCurrentPage("About Us");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            cart = CartItemList.GetCart(); // get on all postbacks

            if (!IsPostBack)               // do on initial load
            {
                Master.AddBreadcrumbLink("/Order.aspx", "Home");
                Master.AddCurrentPage("Cart");

                this.DisplayCart();
            }
            ;
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.AddBreadcrumbLink("/Order.aspx", "Home");

            string header = "Our Products";
            string catID  = Request.QueryString["catID"];

            // assign data source based on whether there's a catID query string value
            if (string.IsNullOrEmpty(catID))
            {
                Repeater1.DataSourceID = "SqlDataSourceAll";
                Master.AddCurrentPage("Products");
            }
            else
            {
                Repeater1.DataSourceID = "SqlDataSourceByCategory";
                Master.AddBreadcrumbLink("/Products.aspx", "Products");

                // amend header string to include category
                switch (catID)
                {
                case "basketball":
                    header += " - Basketball";
                    Master.AddCurrentPage("Basketball");
                    break;

                case "baseball":
                    header += " - Baseball";
                    Master.AddCurrentPage("Baseball");
                    break;

                case "football":
                    header += " - Football";
                    Master.AddCurrentPage("Football");
                    break;

                case "hockey":
                    header += " - Hockey";
                    Master.AddCurrentPage("Hockey");
                    break;
                }
            }

            // set page header text
            Master.HeaderText = header;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.AddBreadcrumbLink("/Order.aspx", "Home");

            string header = "Accesories";
            string catID  = Request.QueryString["catID"];

            // assign data source based on whether there's a catID query string value
            if (string.IsNullOrEmpty(catID))
            {
                Repeater1.DataSourceID = "SqlDataSourceAll";
                Master.AddCurrentPage("Products");
            }
            else
            {
                Repeater1.DataSourceID = "SqlDataSourceByCategory";
                Master.AddBreadcrumbLink("/accesories.aspx", "-accesories");

                // amend header string to include category
                switch (catID)
                {
                case "headphone":
                    header += " - headphone";
                    Master.AddCurrentPage("headphone");
                    break;

                case "speaker":
                    header += " - JBL";
                    Master.AddCurrentPage("JBL");
                    break;
                }
            }

            // set page header text
            Master.HeaderText = header;
        }