943,574 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 3076
  • C# RSS
Jan 7th, 2009
0

file path name

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Light Poster
ayi_102 is offline Offline
27 posts
since Nov 2008
Jan 7th, 2009
0

Re: file path name

by copying it?
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Jan 7th, 2009
0

Re: file path name

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
Reputation Points: 10
Solved Threads: 0
Light Poster
ayi_102 is offline Offline
27 posts
since Nov 2008
Jan 7th, 2009
0

Re: file path name

Create a file with your path on the C-drive. Write to it. Close the file. Done. Look at the File class for details.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Jan 7th, 2009
0

Re: file path name

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?
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Jan 7th, 2009
0

Re: file path name

Nah

i let it be like that

thx for the help
Reputation Points: 10
Solved Threads: 0
Light Poster
ayi_102 is offline Offline
27 posts
since Nov 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: database problem
Next Thread in C# Forum Timeline: add custom control to outlook toolbar in VSTO





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC