i have a image in the form in asp.net
i have a button
i have dragged some labels controls and placed on that image if i click the button i want to save it to sql. Any idea regarding this
Save Edited Image on Sql
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rekha SinghRank #1,571 · 1K reputationPosted Jan 7, 2010, 12:49 AM EST
paul daniel189 reputationPosted Jan 7, 2010, 1:48 AM EST
First u create ImgId,Img,Imglength in ur database and create a byte[] for saving the image in ur db
int imagelen = Upload.PostedFile.ContentLength;
byte[] picbyte = new byte[imagelen];
Upload.PostedFile.InputStream.Read (picbyte, 0, imagelen);
conn.Open ();
SqlCommand cmd = new SqlCommand ("insert into Imgtble"
+ "(ImageField, ImageID) values (@Img, @imageid)", conn);
cmd.Parameters.Add ("@Img", picbyte);
cmd.Parameters.Add ("@imageid", lblImageID.Text);
cmd.ExecuteNonQuery ();
Thanks,
Paul daniel
senthil27 reputationPosted Jan 7, 2010, 2:14 AM EST
i drag and drop labels on that image ... atlast the image with drag and dropped labels stored in database
senthil27 reputationPosted Jan 7, 2010, 2:16 AM EST