Last post Mar 01, 2019 06:43 AM by Ackerly Xu
Feb 20, 2019 04:04 AM|Mohammed Tajudeen|LINK
Very Good Morning,
I have got File server URL. Based on the URL Path.
I want to list folder and files and also access those files in vb.net web page . Is there any control which acts as window explorer in asp.net web page.
My goal is to read and write files should be controlled using asp.net page rather going to window explorer .
Asp.net web page interface should be like a tree view where they can select the folder and view the files .
This is purely asp web site.
I need your support.
Feb 20, 2019 06:31 AM|KathyW|LINK
You can write code to use the TreeView control to accomplish this. See this link for the details, and the code:
https://www.aspsnippets.com/Articles/Display-Directory-Folder-structure-using-ASPNet-TreeView-control-in-C-and-VBNet.aspx Do note the comment that "In order to open (download) files using
the TreeView Node, the root folder and all the files must be present inside the Website’s Root folder."
Feb 20, 2019 09:08 AM|Mohammed Tajudeen|LINK
Dear Kathy ,
Thanks for your help . My files are stored in different location in file server. Is there any way to open the files ? Is there any third party control similar to windows explorer for using in asp.net web.
Feb 21, 2019 02:45 AM|Ackerly Xu|LINK
Hi Mohammed Tajudeen,
Is your server that serves vb application different from the server that servers files?
If they are not the same server, it relates to remote calls not just a control problem
Your vb application should send request to your file server and you file server should return data about the file structure of the fileserver.
If you are sure you file server could provide such service, you could consider using httpclient.
If your server that serves your vb application is the same as your file server, even they are stored in different , you could use two tree views or use a root folder that contains all your files in different locations to just use one tree view.
About open file, there is not consistent solution, because all kinds of files have different mime type.
If the file is pdf, you should use the File api to read the content of the pdf and change the contentType to application/pdf then return the content.
If the file is excel, you should use excel api to read the content of the excel and show the data in a control for example gridview.
Feb 21, 2019 05:09 AM|Mohammed Tajudeen|LINK
Yes , Files is stored in the different server and my application is in different server.
Feb 21, 2019 05:23 AM|Ackerly Xu|LINK
Then you should check whether your file server has the interface to provide data of its file system.
Because one computer has no access to another computer's file system.
It is not enough to get the url of file server.
Mar 01, 2019 05:42 AM|Mohammed Tajudeen|LINK
Ok I will check with the interface in file server. To read and write in file server using asp.net web application interface , which is best method to do.?
Mar 01, 2019 06:43 AM|Ackerly Xu|LINK
Not clear about your file server, as far as I know , few file server has this feature.
If it has , it should have corresponding interface for you, for example , you may use a class which could communicate with the file server.