Skip to content

Instantly share code, notes, and snippets.

@dannylloyd
Created March 30, 2012 14:59
Show Gist options
  • Save dannylloyd/2252120 to your computer and use it in GitHub Desktop.
Save dannylloyd/2252120 to your computer and use it in GitHub Desktop.
Write file to output stream
Context.Response.ContentType = "application/pdf; name=" & filename
Context.Response.AddHeader("content-disposition", "inline; filename=" & filename)
Context.Response.AddHeader("content-length", pdfBytes.Length.ToString())
Context.Response.BinaryWrite(pdfBytes)
Context.Response.End()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment