I want to open PDF in ASP.NET aspx page. I dont want to export a pdf file.
Need just write pdf file in ASPX page same as we are writing bytes into Image control.
Try below code: Here FullPath is full path of file with file name
Dim f1 As New FileStream(FullPath, FileMode.Open)
Dim m1(f1.Length) As Byte
f1.Read(m1, 0, f1.Length)
f1.Close()
File.Delete(FullPath)
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.Clear()
Response.OutputStream.Write(m1, 0, m1.GetLength(0))