My problem i want to find the location of pdf. where it is located in local host. when i try to click download its asking to save.
But my CASE i don't want to save . I Just want to Open to preview.
Below are my code.
Dim fileName As String = strReportName.Replace(".rdlc", "") & "." & fileNameExtension
Dim strPath As String = context.Server.MapPath(fileName)
Dim pdfPath As String = strPath
'Using client As New WebClient()
Dim client As WebClient = New WebClient()
Dim buffer As Byte() = client.DownloadData(pdfPath)
If buffer IsNot Nothing Then
context.Response.ContentType = "application/pdf"
context.Response.AddHeader("content-length", buffer.Length.ToString())
context.Response.BinaryWrite(buffer)
End If
'End Using
_____
Please suggest me any idea?
Thanks,
Ponraj