String or binary data would be truncated. The Statement has been Terminated
protected void btnUpload_Click(object sender, EventArgs e) { con.Open(); string filename = FileUpload1.PostedFile.FileName; string path = "Upload/" + filename; SqlCommand cmd = new SqlCommand("Insert into Zoom(ImageName,ImagePath) values ('"+ filename +"','"+ path +"')", con); cmd.ExecuteNonQuery(); FileUpload1.PostedFile.SaveAs(Server.MapPath("Upload/") + filename.Trim()); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)