protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.QueryString["prodId"])) { var p = new ProductsPersistency(); prod = p.GetById(Request.QueryString["prodId"]); DetailPicture.ImageUrl = "assets/img/" + prod.ImageName; } }
protected void Page_Load(object sender, EventArgs e) { ProductsPersistency prodPersis = new ProductsPersistency(); string idParam = Request.Params.Get("id"); if (!string.IsNullOrEmpty(idParam)) { CurrentProduct = prodPersis.GetById(idParam); productImage.ImageUrl = "~/img/" + CurrentProduct.ImageName; productName.Text = CurrentProduct.Name; } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { return; } if ( !string.IsNullOrEmpty(Request.QueryString["productId"]) ) { var F**k = new ProductsPersistency(); Product = F**k.GetById(Request.QueryString["productId"]); } else { Response.Redirect("/"); } }