Hello,
I have the following code:
- public byte[] getFile(FileUpload file)
- {
- byte[] bytes=null;
- using (Stream fs = file.PostedFile.InputStream)
- {
- using (BinaryReader br = new BinaryReader(fs))
- {
- bytes = br.ReadBytes((Int32)fs.Length);
- }
- }
- return bytes;
- }
Any idea how to fix the error?
Thank you in advance.
Joginder BangerPosted Aug 2, 2016, 1:49 AM
Bhushan GawalePosted Aug 2, 2016, 3:15 AM
DealyPosted Aug 2, 2016, 3:06 AM
Manas MohapatraPosted Aug 2, 2016, 2:35 AM
Joginder BangerPosted Aug 2, 2016, 2:22 AM
Bikesh SrivastavaPosted Aug 2, 2016, 2:20 AM
Rajeev PunhaniPosted Aug 2, 2016, 2:20 AM
Hi Dealy,
Please tryinitializingand tell where exactly you are getting error.DealyPosted Aug 2, 2016, 2:01 AM