// Create a new product protected void createProduct_Click(object sender, EventArgs e) { // Get CategoryID from the query string string categoryId = Request.QueryString["CategoryID"]; // Execute the insert command bool success = CatalogBLO.CreateProduct(categoryId, newName.Text, newDescription.Text, newPrice.Text, newImage1FileName.Text, newImage2FileName.Text, newOnDepartmentPromotion.Checked.ToString(), newOnCatalogPromotion.Checked.ToString()); // Display status message statusLabel.Text = success ? "Insert successful" : "Insert failed"; // Reload the grid BindGrid(); }