This is what I'm using to get the files and display them:
Dim ScienceDT As New Data.datatable
ScienceDT = WebSite.getCADlibrary("Science")
''Grab all the files from SCIENCE
Dim a As Integer
Dim b As Integer = ScienceDT.rows.count - 1
For a = 0 To b
Dim filestructure As String = ScienceDT.rows(a).item("fileStructure")
Dim FolderName As String = ScienceDT.rows(a).item("FolderName")
Dim path As String = filestructure + FolderName
Dim Title As String = ScienceDT.rows(a).item("Title")
Dim ScienceFiles() As String
ScienceFiles = io.directory.getFiles(Server.MapPath(path))
If ScienceFiles.GetLength(0) > 0 Then
Me.lblcontentScience.text = Me.lblcontentScience.text & "<p class='h4'>" & Title & "</p>"
For c As Integer = 0 To ScienceFiles.GetUpperBound(0)
Dim find As Int16 = ScienceFiles(c).LastIndexOf("\")
Dim FileName As String = ScienceFiles(c).Substring(find + 1)
Dim FilePath As String = path & "/" & FileName
FilePath = FilePath.Replace("\", "/")
Me.lblContentScience.Text = Me.lblContentScience.Text & "<a href='" & FilePath & "'>" & FileName & "</a><br>"
Next
End If
Next
Public Shared Function GetCADLibrary(ByVal type As String)
Dim dt As Data.DataTable
Dim str As String = "SELECT * FROM tblCADLibrary WHERE type = '" & type & "'"
dt = DBTools.CreateDT(str, DBLayer.DBTools.DB.DW)
Return dt
End Function
On the page I also have a link to a website that the users can go to to if they do not have a dwg viewer. They can go here and download the viewer. That's also why we have the pdf files up there, if they don't want to do the download, they can view the pdf files instead of the dwg files.
And again, on our old website, it worked. I'm using the EXACT same program in the iFrame as what I was using in the old one. Except it just isn't working in the DNN module and framework.