SHARE
TWEET

Untitled

a guest Jun 25th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HttpContext.Current.Response.Clear();
  2. HttpContext.Current.Response.ClearContent();
  3. HttpContext.Current.Response.ClearHeaders();
  4. HttpContext.Current.Response.Buffer = true;
  5. HttpContext.Current.Response.Charset = "";
  6. HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
  7. HttpContext.Current.Response.ContentType = "application/octet-stream";
  8. HttpContext.Current.Response.AddHeader("Content-Length", myData.Length.ToString());
  9. HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", Path.GetFileName(file)));
  10. HttpContext.Current.Response.BinaryWrite(myData);
  11. //ArquivoPdfProcessado = myData;
  12. HttpContext.Current.Response.Flush();
  13. HttpContext.Current.ApplicationInstance.CompleteRequest();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top