Dear All:
I meet an big problem and can not fix it. While I use Response.BinaryWrite to download file directly, then
the ModalPopupExtender become useless, that means when I click button , the UI not showing any thing about
ModalPopupExtender panel.
The Response.BinaryWrite code snippet is following:
ASP:<asp:UpdatePanel ID="uppnlDownloadFile" runat="server" UpdateMode="Always"><Triggers><asp:PostBackTrigger ControlID="btntest" /></Triggers>
C#:
string filename = "tt.xls"; Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename)); Response.Clear(); using (HSSFWorkbook wb1 = new HSSFWorkbook()) { Response.BinaryWrite(WriteToStream(ReadDataTableToExcel(dt, sheetName, 1000)).GetBuffer()); } Response.End();
And the use of modalpopupentendar is as following:
<asp:Button ID="btnDummy" runat="server" Style="visibility: hidden" /><cc3:ModalPopupExtender ID="ModalPopupExtenderCodeHandling" runat="server" BehaviorID="modalPopupExtenderCodeHandling" TargetControlID="btnDummy" PopupControlID="upnlCodeHandling"></cc3:ModalPopupExtender>
Is any way to solve that, thanks a lot.