Last post Aug 18, 2011 04:48 PM by ptiso
Nov 12, 2010 08:12 PM|Ennair|LINK
i am trying to have a download on my page. I have implemented the code below but code execution stops after the download message pops up, even if i press save or cancel, nothing happens after that.
Response.AddHeader("Content-Disposition", "attachment; filename=" + lFile.Name);
Response.ContentType = "application/octet-stream";
I have tried it a few times without Response.Clear() and Response.End() but it didn't make any difference to take these off. Is there anyway I can achieve this without having to using an IFrame?
Any suggestions will be very much appreciated.
Nov 13, 2010 11:00 AM|qwe123kids|LINK
Is Size of file is very large?
Nov 13, 2010 02:15 PM|Ennair|LINK
Nov 13, 2010 03:53 PM|qwe123kids|LINK
have tried donwlaoding File less then 1 mb?
Nov 13, 2010 06:48 PM|Ennair|LINK
The one I have currently downloads fine. It just stops code execution after the download.
Nov 16, 2010 11:53 AM|Ennair|LINK
Any suggestions on this one please? I don't understand why the page execution doesn't continue after the download. There is only a label that's assigned some text to its Text property before the download has been initiated but the text never shows up because
the download stops that.
It looks like no matter where in the code I add the custom HTTP headers for downloading the file, the download will start before the Label's text shows on the screen. They are both in the same
Nov 16, 2010 12:19 PM|qwe123kids|LINK
Not very sure
have tried using after Transmit file?
Nov 16, 2010 12:56 PM|Ennair|LINK
i have done that. I don't think that's the problem, it seems like the response will end anyway after the download dialogue pops up so anything that still hasn't been written to the screen is halted.
Any one else with suggestions to this please?
Aug 18, 2011 04:48 PM|ptiso|LINK
Hello, i know this post is old but I wanted to know if you find any solution for this problem :(