I am trying to design a web form in ASP.NET using Visual Studio Express 2012.
I need to take data from some text boxes
, and write it to a Text file
.
This is a very simple program, but I am having trouble setting the file path.
This application will be sent to someone else, and they have to run the project from their computer.
The file I want is called Database.txt
and it is found in D:\Project\bin\Database.txt
.
So if he pastes this folder in his Desktop, it becomes C:\Users\Desktop\Project\bin\Database.txt
.
I am having trouble setting a dynamic path that can find this file regardless of where the project folder is.