Found via Google:
From: Microsoft® Scripting Library - FileSystemObject
.....
Because use of the FSO on the client side raises serious security issues
about providing potentially unwelcome access to a client's local file
system, this documentation assumes use of the FSO object model to create
scripts executed by Internet Web pages on the server side. Since the server
side is used, the Internet Explorer default security settings do not allow
client-side use of the FileSystemObject object. Overriding those defaults
could subject a local computer to unwelcome access to the file system, which
could result in total destruction of the file system's integrity, causing
loss of data, or worse
....
Use of the FSO is possible client-side in IE, provided the user has set
"enable objects not marked as safe for scripting" (or words to that
effect) to "allow" or "prompt".
James
"cedced" <ce********@yahoo.fr> wrote in message
news:bh**********@muguet.sncf.fr...
In fact, i know the fullpath (c:\liste1.txt) on client pc.
But in javascript, i can't using a datagrid.
SO......(I must use datagrid so using vb.net but file is on client pc)
javascript :
v_chemin = ParamValeur(maVariable);
var fs = new ActiveXObject("Scripting.FileSystemObject");
mon_fichier = fs.GetFile(v_chemin).OpenAsTextStream(1);
ligne = mon_fichier.ReadLine();
//REMPLIT DATAGRID
while (mon_fichier.AtEndOfStream==false){
ligne = mon_fichier.ReadLine();
//REMPLIT DATAGRID
}
//BINDLIST
"James J. Foster" <ja***@dotnetcoders.com> a écrit dans le message de
news: uK**************@TK2MSFTNGP10.phx.gbl... From ASP.NET, no, you cannot access the files on the client machine
since that code runs on the server. There would be severe security
implications, not to mention technological hurdles, if you could ask the client
browser to give you any file from the client's machine.
--
James J. Foster, DotNetCoders
http://www.dotnetcoders.com
"cedced" <ce********@yahoo.fr> wrote in message
news:bh**********@muguet.sncf.fr... Hello,
is it possible to access client files in VB.NET?
What?
I have doing that but it isn't good (VB.NET take file on pc server and
not on pc client):
(thanks)
Dim fichier As StreamReader
Dim name As String
fichier = File.OpenText("C:\liste.txt")
name = fichier.ReadLine()
Response.Write(name)
Do While Not name Is Nothing
name = fichier.ReadLine()
Response.Write(name)
Loop
fichier.Close()