In my asp.net web application,I have to read somef file inside the App_Data folder,but I have no idea hot to set the path.
If in the web form,I know I can use the:
Sever.mapPath("~/App_Data");
But now I want to retrive the path in the .cs file in the App_code.
So there is no HttpServer context there.
Any idea?
In asp.net have System.IO namespace which contain many functions related to files.
you can get both path and file related function in below namespace
you can get full file path in .cs file as below
Hope this will helps you…