retrive client logical drives in alternative of Directory.GetLogicalDrive which used in server side
-
hi, everybody.. I want to retrieve client drives (in short file manager). Actually i am trying with Directory.GetLogicalDrive() function, but its returns logical drive of the server in which asp.net website is installed. i want logical drives from client PC.. i.e. i want to client to be select some files or folder from own PC and by that path i upload whole folder or files without using fileupload control limitations. im using this code right now foreach (string drive in Directory.GetLogicalDrives()) { TreeNode tn = new TreeNode(); tn.Text = drive; tn.Value = drive; TreeView1.Nodes.Add(tn); } thanks in advance... please i m really stuck at this. Best Regards, Punit Belani
-
hi, everybody.. I want to retrieve client drives (in short file manager). Actually i am trying with Directory.GetLogicalDrive() function, but its returns logical drive of the server in which asp.net website is installed. i want logical drives from client PC.. i.e. i want to client to be select some files or folder from own PC and by that path i upload whole folder or files without using fileupload control limitations. im using this code right now foreach (string drive in Directory.GetLogicalDrives()) { TreeNode tn = new TreeNode(); tn.Text = drive; tn.Value = drive; TreeView1.Nodes.Add(tn); } thanks in advance... please i m really stuck at this. Best Regards, Punit Belani
punit belani wrote:
i.e. i want to client to be select some files or folder from own PC
You have to use any Scripting language to do so. Use Javascript to get the files on the client system and then bind it to tree or any control you want to show the result.
-
punit belani wrote:
i.e. i want to client to be select some files or folder from own PC
You have to use any Scripting language to do so. Use Javascript to get the files on the client system and then bind it to tree or any control you want to show the result.
first of all thanks for reply. i am new to scripting language, can you give some broader idea, for using java scripts for this purpose. or give some useful links.
-
hi, everybody.. I want to retrieve client drives (in short file manager). Actually i am trying with Directory.GetLogicalDrive() function, but its returns logical drive of the server in which asp.net website is installed. i want logical drives from client PC.. i.e. i want to client to be select some files or folder from own PC and by that path i upload whole folder or files without using fileupload control limitations. im using this code right now foreach (string drive in Directory.GetLogicalDrives()) { TreeNode tn = new TreeNode(); tn.Text = drive; tn.Value = drive; TreeView1.Nodes.Add(tn); } thanks in advance... please i m really stuck at this. Best Regards, Punit Belani
Use javascript to achieve what you want. Refer to this link for the code sample. It uses ActiveX to retrieve a list of drives in the client machine. However, this only works on IE as Mozilla doesn't support ActiveX by default. You need to install an addin for that. http://www.devarticles.com/c/a/JavaScript/Advanced-JavaScript-with-Internet-Explorer-Working-with-Drives-and-More/
-
Use javascript to achieve what you want. Refer to this link for the code sample. It uses ActiveX to retrieve a list of drives in the client machine. However, this only works on IE as Mozilla doesn't support ActiveX by default. You need to install an addin for that. http://www.devarticles.com/c/a/JavaScript/Advanced-JavaScript-with-Internet-Explorer-Working-with-Drives-and-More/
thanks for reply, im now start working on it.