Guest User

Untitled

a guest
Jan 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. Response.Buffer = false; //new
  2. Response.Clear(); //new
  3. Response.ClearContent();
  4. Response.ClearHeaders();
  5. Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
  6. Response.ContentType = "Application/pdf";
  7. try
  8. {
  9. Response.TransmitFile(filename);
  10. Response.End();
  11. }
  12. catch
  13. {
  14. Response.ClearContent();
  15. }
  16.  
  17. ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(Button);
Add Comment
Please, Sign In to add comment