Save and Retrieve images from Access Database (mdb file) in ASP.Net using C#

Last Reply on Apr 17, 2015 07:29 AM By Mudassar

Posted on Apr 15, 2015 09:52 PM

I have used following code to save image but it shows following error:

Code :

byte[] fileByte = null;
            string path = openFileDialog1.FileName;
            FileStream fs = new FileStream(path,FileMode.Open,FileAccess.Read);
            BinaryReader br = new BinaryReader(fs);
            long allbyte = new FileInfo(path).Length;
            fileByte = br.ReadByte((Int32)allbyte);

Error :

Error 1 No overload for method 'ReadByte' takes '1' argument


please solve above problem and also provide the solution for reading image same as converted via above code

You are viewing reply posted by: Mudassar on Apr 17, 2015 07:29 AM.
Posted on Apr 17, 2015 07:29 AM