OK , I'm a bit new to this game. I'm trying to build a web page that simply scans a directory in the server and creates a web page with links to the files in that directory - sounds simple and should be easy to do !
So I have a bit of code that reads the myDocuments folder in my web site and then populates a grid view hyperlink column with the filenames in the folder - wow it works !
The only thing I am struggling with now is getting the hyperlink correct within the GridView so that the user goes to the actual document.
So my code behind is;
Dim dirInfo As New System.IO.DirectoryInfo(Server.MapPath("~/MyDocuments"))
articleList.DataSource = dirInfo.GetFiles()
which reads the file info in the directory myDocuments and binds the info to a datasource.
So now I'm using that datasource to display the filenames in a gridview so that the user can click on a name and open the file.
View Complete Post