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

by copying it?


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

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

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?


i let it be like that

thx for the help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.