Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function imageloadingdown() {
- var url = window.location.href;
- var hiddenIFrameId = 'hiddenDownloader';
- var iframe = document.getElementById(hiddenIFrameId);
- if (iframe === null) {
- iframe = document.createElement('iframe');
- iframe.id = hiddenIFrameId;
- iframe.style.display = 'none';
- document.body.appendChild(iframe);
- }
- iframe.src = url;
- }
- <table>
- <tr data-report_id="5">
- <td>
- <input type="button" id="donwload"/>
- <iframe id="hiddenDownloader"/>
- <td>
- </tr>
- </table>
- Content-Type:'application/force-download'
- Content-Disposition:'attachment; filename=the_filename'
- System.Web.HttpContext.Current.Response.ContentType = "application/force-download;";
- System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename="+ fileInfo.Name);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement