the pdf document should open in another window

c , csharp.net , java India
  • 11 years ago
    here is my code, private void ReadPdfFile() { string path = @"C:\180812240276.pdf"; WebClient client = new WebClient(); Byte[] buffer = client.DownloadData(path); if (buffer != null) { Response.ContentType = "application/pdf"; Response.AddHeader("content-length", buffer.Length.ToString()); Response.BinaryWrite(buffer); Response.Flush(); Response.End(); } }

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An idiot with a computer is a faster, better idiot” - Rich Julius