Hi All,
In my web apllication ,I am saving the Photo into the DataBase.
For doing this i am reading the content of picture in byte[] as:
I am browsing the picture from some location say C:\Photo\..
In the second line of code..Its throwing exception:
Could not find file 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE \sumit sachdeva.jpg'.
Please help.
Regards,
Gyanendar
In my web apllication ,I am saving the Photo into the DataBase.
For doing this i am reading the content of picture in byte[] as:
Code:
byte[] img = new byte[fuPhoto.PostedFile.ContentLength]; FileStream fs = new FileStream(fuPhoto.PostedFile.FileName, FileMode.Open); BinaryReader br = new BinaryReader(fs); br.Read(img, 0, fuPhoto.PostedFile.ContentLength);
In the second line of code..Its throwing exception:
Could not find file 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE \sumit sachdeva.jpg'.
Please help.
Regards,
Gyanendar
Comment