I'm trying to use RadProgressArea to monitor custom progress.Everything works good, but the last part of my method is to return file to a user for a download. I do this through writing stream to a response and ending it with Response.End(). Something like this:
RadProgressContext progress = RadProgressContext.Current;
progress.SecondaryValue = 1;
progress.SecondaryPercent = 1;
progress.SecondaryTotal = 100;
progress.SecondaryValue = 50;
progress.SecondaryPercent = 50;
byte b = File.ReadAllBytes("c:\\image1.jpg");
Context.Response.ContentType = "image/jpg";
Response.AddHeader("content-disposition", "attachment; filename=image.jpg");
It works great except RadProgressArea is not hidden after method is complete. I guess this happens because of the abruption of the response stream, because it hides if I do not have last 5 lines of code.
Is there any workaround of this issue?