protected void sub_Click(object sender, EventArgs e) { string name = rname.Text; string email = remail.Text; string com = textarea.Text; string query = "INSERT INTO product_review(rev_name,rev_email,rev_comments) VALUES('" + name + "','" + email + "','" + com + "')"; string r = con.insert(query); Response.Write("<script>alert('" + r + "');</script>"); }
protected void Button1p_Click(object sender, EventArgs e) { string pname = productName.Text; string pprice = productPrice.Text; string filename = FileUpload1.FileName; FileUpload1.PostedFile.SaveAs(Server.MapPath("uploads/" + filename)); string image = "~/Admin/uploads/" + filename.ToString(); string catId = cat_id.SelectedValue; string query = "INSERT INTO product_tbl(product_name,product_price,product_image,cat_id) VALUES('" + pname + "','" + pprice + "','" + image + "','" + catId + "')"; string st = con.insert(query); Response.Write("<script>alert('" + st + "');</script>"); }