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) { // set breadcrumb on first load; if (!IsPostBack) { Master.AddCurrentPage("Home"); } }
protected void Page_Load(object sender, EventArgs e) { Master.HeaderText = "Account Information"; Master.AddCurrentPage("Account Information"); btnUpdate.Visible = false; btnUpdateInfo.Visible = true; string imageHeader = "~/Images/Products/"; if ((string)Session["AccountInfoRecorded"] == "true") { txtFirstName.Text = (string)Session["FirstName"]; txtLastName.Text = (string)Session["LastName"]; txtEmail.Text = (string)Session["Email"]; txtPhone.Text = (string)Session["Phone"]; txtAddress.Text = (string)Session["Address"]; txtCardNumber.Text = (string)Session["CardNumber"]; txtExpiration.Text = (string)Session["CardExpiration"]; txtSecuityCode.Text = (string)Session["CardSecurityCode"]; txtCity.Text = (string)Session["City"]; txtState.Text = (string)Session["State"]; txtZipcode.Text = (string)Session["Zipcode"]; txtCardType.Text = (string)Session["CardType"]; } if ((string)Session["Load"] == "Two") { ItemOneImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductOnePicture"]); ItemOneBtn.Text = (string)Session["ProductOneName"]; ItemOnePrice.Text = (string)Session["ProductOnePrice"]; } else if ((string)Session["Load"] == "Full") { ItemOneImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductOnePicture"]); ItemOneBtn.Text = (string)Session["ProductOneName"]; ItemOnePrice.Text = (string)Session["ProductOnePrice"]; ItemTwoImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductTwoPicture"]); ItemTwoBtn.Text = (string)Session["ProductTwoName"]; ItemTwoPrice.Text = (string)Session["ProductTwoPrice"]; } else if ((string)Session["Load"] == "Replace") { ItemOneImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductOnePicture"]); ItemOneBtn.Text = (string)Session["ProductOneName"]; ItemOnePrice.Text = (string)Session["ProductOnePrice"]; ItemTwoImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductTwoPicture"]); ItemTwoBtn.Text = (string)Session["ProductTwoName"]; ItemTwoPrice.Text = (string)Session["ProductTwoPrice"]; ItemThreeImg.ImageUrl = String.Concat(imageHeader, (string)Session["ProductThreePicture"]); ItemThreeBtn.Text = (string)Session["ProductThreeName"]; ItemThreePrice.Text = (string)Session["ProductThreePrice"]; } else { // Do Nothing } }
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(); } ; }
protected void Page_Load(object sender, EventArgs e) { // bind dropdown and set breadcrumb on first load; if (!IsPostBack) { ddlProducts.DataBind(); Master.AddCurrentPage("Home"); } // get and show product data on every load selectedProduct = this.GetSelectedProduct(); lblName.Text = selectedProduct.Name; lblShortDescription.Text = selectedProduct.ShortDescription; lblLongDescription.Text = selectedProduct.LongDescription; lblUnitPrice.Text = selectedProduct.UnitPrice.ToString("c") + " each"; imgProduct.ImageUrl = "Images/Products/" + selectedProduct.ImageFile; }
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) { // set breadcrumb on first load; if (!IsPostBack) { Master.AddCurrentPage("Home"); Session["Load"] = "One"; } if (Session["ProductName"] != null) { ddlProducts.SelectedValue = (string)Session["ProductName"]; Session["ProductName"] = null; } if (Session["ProductLinkID"] != null) { ddlProducts.SelectedValue = (string)Session["ProductLinkID"]; Session["ProductLinkID"] = null; } }
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; }