Last post Sep 12, 2013 08:41 AM by Nasser Malik
Sep 12, 2013 07:37 AM|kumarsrisakthi|LINK
I my db storing the images as byte, i was fetched from db and displayed the image in image control.
My requirement is if i click the save button the image should be saved in local
system directory how could i do this could anybody guide to me.
Sep 12, 2013 08:41 AM|Nasser Malik|LINK
You need to write your bytes to some file
SqlCommand mycmd = new SqlCommand("select image_field from your_table where field_id = @ID",yourSqlConn);
cmdSelect.Parameters["@ID"].Value = 100; //this can be also an input for user etc.
FileStream fs=new FileStream(strfn,FileMode.CreateNew, FileAccess.Write);
Save Image into folder from sql database