How to save an image from Image Control to SQL Server? I am not uploading that image, but i'm capturing it through webcam and displaying it on image control.
Asked
Active
Viewed 356 times
1 Answers
0
Supposing you need to save the image itself, and not the path, you could do:
FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
byte[] image = br.ReadBytes((int)fs.Length);
And then, send the bytes to your database.

Jhonatas Kleinkauff
- 956
- 7
- 18