lapucca
asked on
What's the best way to reference a file path for ReadAllBytes?
Hi, I'm using VS2013, C# and asp.net webform
I need to read in a Word file into a byte[] using ReadAllBytes(). Should I add this Word file to my project? If I add this word file (maybe a folder too?) to the project then how can I put as file path for the ReadAllBytes()?
I really don't like using the hard coded c:\xxx\yyy.docx unless I must. I mean when I publish this to the web server the path will change so hard cording path doesn't seem like a good idea to me.
thank you.
I need to read in a Word file into a byte[] using ReadAllBytes(). Should I add this Word file to my project? If I add this word file (maybe a folder too?) to the project then how can I put as file path for the ReadAllBytes()?
I really don't like using the hard coded c:\xxx\yyy.docx unless I must. I mean when I publish this to the web server the path will change so hard cording path doesn't seem like a good idea to me.
thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER