Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpContext.Current.Response.Clear();
- HttpContext.Current.Response.ClearContent();
- HttpContext.Current.Response.ClearHeaders();
- HttpContext.Current.Response.Buffer = true;
- HttpContext.Current.Response.Charset = "";
- HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
- HttpContext.Current.Response.ContentType = "application/octet-stream";
- HttpContext.Current.Response.AddHeader("Content-Length", myData.Length.ToString());
- HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", Path.GetFileName(file)));
- HttpContext.Current.Response.BinaryWrite(myData);
- //ArquivoPdfProcessado = myData;
- HttpContext.Current.Response.Flush();
- HttpContext.Current.ApplicationInstance.CompleteRequest();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement