I have tested this in IIS 6.1, IE 7, ASP.NET 3.5 SP1.
I have a file download in a method in my aspx codebehind:
Response.ContentType = contentType;
Response.AppendHeader("Content-Disposition", contentDisposition);
Response.BinaryWrite(file);
This works great, but if I attempt to modify any of my sever side controls the changes do not take affect. I have isolated this down to the call to ContentType, this apparently whipes all pending changes to the Response stream when called? Does this sound familiar to anyone?
If the code takes an alternate branch and the call to download does not fire the markup is modified as expected.
Any suggestions on how I can fix this and have the page flush the attachment and update the UI in the same response stream?
This is specifically for updating the ValidationSummary, so I could tear into the JS on the PageRequestManager event complete as a last resort, but I'd prefer not to rely on JS for this.