I would like to use standard ASP.NET file download response, like in other Stack Overflow question.
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition","attachment; filename=logfile.txt");
Response.TransmitFile( Server.MapPath("~/logfile.txt") );
Response.End();
But inside update panel it does not work. What I have to do, that I will get a file if the download event is triggered inside update panel?
Well, I have found nice blog post on Encosia which describe solution of this ASP.NET AJAX file download problem. It work really nice.
http://encosia.com/2007/02/23/ajax-file-downloads-and-iframes/