Create file in local user-machine

B

Bnob

It is possible to create a file in local user-machine?

With this code in code-behind:

fs = New System.IO.FileStream(lFileCSV, System.IO.FileMode.Create,
System.IO.FileAccess.Write)

The file is created on the server.

Any idea?
 
G

Guest

hi,
The code creates a file on the server since it is getting executed on the
server side. You might have to try and send the file using
response.binaryWrite so that the user can save the file to his machine.
HTH
srini
 
B

Bnob

Michael Tkachev a couché sur son écran :
Why do you want to create a file in the client-machine?

The file to create is a csv file

So each user have a different web page, and I'don't want to save this
file in the server.
 
G

Guest

....Or, if this is a controlled environment, and you know that the user's
browser settings will allow it, you can create a client-side FileSystemObject
object with VBScript or JavaScript. Here is a start:

<script language=javascript>
var fso=new ActiveXObject("Scripting.FileSystemObject");
</script>

OR

<script language=vbscript>
Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")
</script>

Good luck.

-Jess
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top