copy word doc from web server application to client machine

M

mike11d11

In a asp.net app. can you copy a file from the web server to the
client's hard drive? I have a word doc that is part of my web program
that i want copied to the users c:\ drive or temporary internet files
folder. Also can you create a text file on the users computer using a
stream writer or something? thanks in advance for any help.
 
M

Mark Rae [MVP]

In a asp.net app. can you copy a file from the web server to the
client's hard drive?

No, for fairly obvious security reasons...
I have a word doc that is part of my web program that i want copied
to the users c:\ drive or temporary internet files folder.

You can make the document available for download, but the user will need to
initiate the download e.g. by clicking on a hyperlink etc...
Also can you create a text file on the users computer using a stream
writer
or something?

Again, no for the same reason.
 
G

Guest

In a asp.net app. can you copy a file from the web server to the
client's hard drive? I have a word doc that is part of my web program
that i want copied to the users c:\ drive or temporary internet files
folder. Also can you create a text file on the users computer using a
stream writer or something? thanks in advance for any help.

You can't save a file without user interaction. You can open it in the
browser, or send an Open/Save prompt in order to allow to download the
file.

If you open a file in-line, a copy will be saved in the temporary
internet files folder (it depends on a settings)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top