Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function imageloadingdown() {
  2. var url = window.location.href;
  3. var hiddenIFrameId = 'hiddenDownloader';
  4. var iframe = document.getElementById(hiddenIFrameId);
  5. if (iframe === null) {
  6. iframe = document.createElement('iframe');
  7. iframe.id = hiddenIFrameId;
  8. iframe.style.display = 'none';
  9. document.body.appendChild(iframe);
  10. }
  11. iframe.src = url;
  12. }
  13.  
  14. <table>
  15. <tr data-report_id="5">
  16. <td>
  17. <input type="button" id="donwload"/>
  18. <iframe id="hiddenDownloader"/>
  19. <td>
  20. </tr>
  21. </table>
  22.  
  23. Content-Type:'application/force-download'
  24. Content-Disposition:'attachment; filename=the_filename'
  25.  
  26. System.Web.HttpContext.Current.Response.ContentType = "application/force-download;";
  27. System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename="+ fileInfo.Name);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement