protected void btnPlaceOrder_Click(object sender, EventArgs e) { DataTable userDt = (DataTable)Session["UserWholeRecord"]; int customerID = Convert.ToInt32(userDt.Rows[0]["user_id"]); CustomerOrderDetails cod = new CustomerOrderDetails { CustomerID = customerID, GUID = Request.QueryString["id"].ToString(), Address = txtAddress.InnerText, PhoneNumber = txtPhoneNumber.Text, Quantity = ddlProductQuantity.SelectedValue.Equals("-1") ? 1 : ddlProductQuantity.SelectedIndex, TotalPrice = Convert.ToDouble(lblTotalPrice.Text) }; ECommerceBusiness ecb = new ECommerceBusiness { CODObj = cod }; ecb.AddNewCustomerOrderDetails(); Panel panel = OrderBody; panel.Style.Add("display", "none"); panel = pCPOD; panel.Style.Add("display", "none"); lblMessage.Text = "Your order will be placed within 24 hours!"; lblMessage.Style.Add("display", "block"); }