ok , I can't give u exact code here as i dont have VS.Net with me right now
... But lets start, You can use system.IO namespace
Create object of FileStream Providing name of file and filemode which is open
Then Read file using objFileStream.Read(byteArray,offset, length)
After Read you will get whole file in byteArray in form of bytes.
Now you can use Convert.ToBase64String(byteArray) to convert this file as
Base64String and store this string in resx file. You can also store file name
in resx file too. While Retrieving Read Base64String from resource file ,
again convert it back to bytearray, Create FileStream and save this
byteStream as filename stored in resx file.
"ad" wrote:
Thanks,
I mean for example: I have a Excel file stored in a Resource File.
How can I retrive the Excel file?
"Altaf Al-Amin Najwani" <Al****************@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:0A*********************** ***********@microsoft.com... well resx is itself a file so if you see question its like uploading file
in
another file .... but anyways you can open file to upload and read it
using
classes in System.IO namespace and then can convert those bytes into
BASE64String using system.text namespace classes and save this string to
resx
file. At the time of retrieving you can then decode this Base64String.
"ad" wrote:
I wnat to load a file in an .resx file and transfer the file to a stream.
How can I do?