0

this is asp using c#

string filename = "tracking result.csv";
        string sExportFile = Server.MapPath(filename);

it just the piece of the code

the code save the file to the server

Q = How can i save the file to the C drive? eg like c:\\testfolder\tracking result.csv

4
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by ayi_102
0

yeah,

it can be by copying from the one that i have on the server?

coz my one is saved in the vs project sollution

and try to make another copy to the user in another specified folder

so they dont have to open the project folder

0

Create a file with your path on the C-drive. Write to it. Close the file. Done. Look at the File class for details.

0

But test of you've write access on the "C:\", check it.. I recommend such question to be in ASP.NET forum!! what do you see?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.