protected void Update_Click(object sender, EventArgs e) { if (IsValid) { ProductItem currentProduct = Session["Product"] as ProductItem; currentProduct.productDescription = txtProductDescription.Text; if (fullImage.HasFile) { currentProduct.productImage = fullImage.FileName; } uploadImageFile(fullImage); currentProduct.productPrice = Convert.ToDouble(txtPrice.Text); Session["Product"] = currentProduct; ProductItem.updateProduct(currentProduct); Session.Remove("Product"); Response.Redirect("~/UL/AdminProductManagement"); } }