save file on client machine

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2006
Posts: 1
Reputation: missnehamishra is an unknown quantity at this point 
Solved Threads: 0
missnehamishra missnehamishra is offline Offline
Newbie Poster

save file on client machine

 
0
  #1
Jan 3rd, 2007
I want to save a file on client machine.

i even used the commnad "Path.GetTempPath()" but it gives the address of server's temp folder.

can someone help me?????
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 79
Reputation: nikkiH is an unknown quantity at this point 
Solved Threads: 4
nikkiH's Avatar
nikkiH nikkiH is offline Offline
Junior Poster in Training

Re: save file on client machine

 
0
  #2
Jan 3rd, 2007
C# runs on the web server. It would be pretty dangerous for web applications to just be able to just save files on a client machine whenever they wanted.
You can either prompt the user to click a link, which then lets the user choose where to save the file, or you can stream the file to the browser and set the content type.
There are also COM / ActiveX objects that can save files to the client, but there are browser issues, of course. Anything that hits the client, hits the browser, when you're talking web apps. At the most basic level, the web application does a bunch of stuff on the web server that generates a static file, which is then sent to the browser over http protocol. By the time the browser sees it, the C# is totally done running and the process has completed.

(I'm assuming this is a web application or you wouldn't be having issues with a server, I wouldn't think)

There may be multiple solutions for what you're trying to do; so, what are you really trying to do?
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 39
Reputation: Maidomax is an unknown quantity at this point 
Solved Threads: 0
Maidomax Maidomax is offline Offline
Light Poster

Re: save file on client machine

 
0
  #3
Jan 7th, 2007
It really is jus common sense... What would internet look like and how long would it last if just about anybody could save any thing on another person's computer. Common sense tells you that the person has to allow you to save the file on his(or hers) computer (, and where exactly).
Am I not right?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC