Hi,
I have an asp.net web page, which needs to write to a text file, located in the same directory (up on my host's server). I am currently trying to use StreamWriter to achieve this.
I am having problems writing to this text file.
The main problem is finding the full path of the file. Is there are trick I can use, to avoid having to specify the the full path of the file (as this is what is creating a big problem)?
So, to give you an idea we have the following files:
PastMessages.ai
PrecompiledApp.config
default.aspx
web.config
default.aspx contains the program which does the file writing.
What I want to do is have the program carry out some simple operations and then to write to PastMessages.ai, every time a button is pressed. However, in order to do this, I need to know the FULL path of PastMessages.ai, which I cannot find (correctly).
Any help would be appreciated.
I have an asp.net web page, which needs to write to a text file, located in the same directory (up on my host's server). I am currently trying to use StreamWriter to achieve this.
I am having problems writing to this text file.
The main problem is finding the full path of the file. Is there are trick I can use, to avoid having to specify the the full path of the file (as this is what is creating a big problem)?
So, to give you an idea we have the following files:
PastMessages.ai
PrecompiledApp.config
default.aspx
web.config
default.aspx contains the program which does the file writing.
What I want to do is have the program carry out some simple operations and then to write to PastMessages.ai, every time a button is pressed. However, in order to do this, I need to know the FULL path of PastMessages.ai, which I cannot find (correctly).
Any help would be appreciated.