You should look at the System.IO namespace. For text files the most
appropriate methods are the static methods OpenText, CreateText and
AppendText on the System.IO.File class:
There are examples in each of the topics that will be of help to you.
Just make sure you:
- Set enough rights for the account the code is executed with (usually
ASPNET or NETWORK SERVICE) for the files/folders you work with
- Close the streams (stream reader or stream writer) after you finish
reading/writing.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.