Last post Mar 28, 2011 12:42 AM by simple_hi
Mar 27, 2011 03:33 AM|simple_hi|LINK
i am working on the mobile application, and i want to read binary file .. its just contains the string.. e.g "hi Wel come".
i have opened that file using filestream and try to read that file using binaryReader.. but it didn't read that file correctly...
if i use binaryreader.readstring();
it throws an exception of endOfstream...
when i stored that stream into array of byte and read it through response.binaryWrite.... like
it shows me the correct result as i want ..i.e it shows the "hi wel come" on browser...
like this i want to store that content of file into string ..
so how is it possible.... its urgent plz
Mar 27, 2011 01:43 PM|roopeshreddy|LINK
Check the following link
Hope it helps u...
Mar 28, 2011 12:42 AM|simple_hi|LINK
no its not i want. i want to read .dat file .and it contains some text then how can i read that .dat file and store its text content into string. i have tried with
binaryreader br=new binaryreader(fs);
but it throws me an exception "EndOfStreamException".
but if i read all the contents into array of bytes and read it using response.binarywrite(buffer);
it reads it correctly...
i want the same i want to store the text into the string ... so plz