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.