protected void ImageInsert() { { MySqlConnection con = new MySqlConnection(constr); MySqlCommand cmd = new MySqlCommand("INSERT INTO Images(Image) VALUES ('"+CheckBox().ToString()+"')", con); con.Open(); int s1 = cmd.ExecuteNonQuery(); if (s1 > 0) { imgUp1.Text = "Image Uploaded succesfully!"; } con.Close(); } } private string CheckBox() { string url=null; foreach (GridViewRow row in gvImages.Rows) { CheckBox chkBox = row.FindControl("chkRow") as CheckBox; if (chkBox !=null && chkBox.Checked) { Image img = (Image)row.Cells[1].Controls[1]; url = img.ImageUrl; } } return url; }</pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)