Author: steverashi | Posted on: 2/3/2009 3:54:50 AM | Views : 473

 I have a ListBox that shows a list of files in a folder. I need these to be displayed as links so that when clicked they are displayed in the browser. All the documents are pdf format. Here is the code I have:
Dim DirectoryPath As String = "\\192.168.0.145\Sites\Intranet\Drawings"
        Dim Directory As New IO.DirectoryInfo(DirectoryPath)
        Dim File As IO.FileInfo

        If DirectoryPath <> "" Then
            For Each File In Directory.GetFiles("*.pdf")
                ListBox1.Items.Add(File.Name)
           Next
        End If
    End Sub
&nb ...

Go to the complete details ...