Get List of Files from all Sub-Directories on Network share

This example will load a list box of documents from a network share. It will then allow the user to select the file to print from the browser.

1. Create a class that contains the name of the file and full path and file name. This will later be used to add to a generic list.

2. Create a method that will read all the sub-directories and file names to load to a list box.

3. When the user selects an item from the list render open the document (example a PDF) in from the browser.

For an example of how to render an object (PDF, Word, ZIP...) to the browser for opening see this post.

Code snippet attached.

Get_Network_Files.cs (2.69 kb)

Comments are closed