Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I saved text file in my window application folder. I open and read the file (the path i have given exactly). Now i copied the whole project and paste in some other root. Now how to manage that text file open and read operation.

I know in asp.net we have Server.MapPath. But in window form how to do? please guide me

Thank you.
Posted
Comments
demouser743 22-Nov-11 2:53am    
Are you saving your file in to a directory or any other can you please tell

Just simply add references of the folder or files which you want to include, by right clicking on your folder where you have kept all your forms..
 
Share this answer
 
I don't know what you are doing but you try this

C#
Application.StartupPath



For more information check here

http://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900