Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Response.Buffer = false; //new
- Response.Clear(); //new
- Response.ClearContent();
- Response.ClearHeaders();
- Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
- Response.ContentType = "Application/pdf";
- try
- {
- Response.TransmitFile(filename);
- Response.End();
- }
- catch
- {
- Response.ClearContent();
- }
- ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(Button);
Add Comment
Please, Sign In to add comment