this code works fine to display images, but when I change the strFileName to a .PDF document it doesn't work...is there something else I need to do to view a .PDF?
Code:Const strFileName As String = "C:\Inetpub\wwwroot\pbss\interstate.gif" Dim objStream As Stream = File.Open(strFileName, FileMode.Open) Dim buffer(objStream.Length) As Byte objStream.Read(buffer, 0, objStream.Length) objStream.Close() Response.BinaryWrite(buffer)




Reply With Quote