I have created a sub folder (named 'Data') under my project through the solution explorer. I also have created a text file (data.txt) inside the new sub folder. This text file is used to store information such as settings and connections.
I can check the file using the full path. However, I want to avoid errors such as moving the project folder to a different location. Is there anyway to check using a relative path? File.Exists("~\Data\data.txt")
Or is it better to create it under Application.StartupPath?
Thank you in advance
I can check the file using the full path. However, I want to avoid errors such as moving the project folder to a different location. Is there anyway to check using a relative path? File.Exists("~\Data\data.txt")
Or is it better to create it under Application.StartupPath?
Thank you in advance