469,623 Members | 1,928 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Create file in local user-machine

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?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Nov 18 '05 #1
4 3237
Why do you want to create a file in the client-machine?

"Bnob" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
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?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Nov 18 '05 #2
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

"Bnob" wrote:
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?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Nov 18 '05 #3
Michael Tkachev a couché sur son écran :
Why do you want to create a file in the client-machine?

"Bnob" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
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?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com


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.

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Nov 18 '05 #4
....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

"Bnob" wrote:
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?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ron Vecchi | last post: by
5 posts views Thread by Philip Nelson | last post: by
2 posts views Thread by =?Utf-8?B?YXJqZW4xOTg0?= | last post: by
16 posts views Thread by Mich | last post: by
6 posts views Thread by Mr. X. | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.