Nov 12, 2012, 3:50 PM
Export Data into XML, Excel or CSV using a full PostBack
Hi
I am using this "https://examples2.ext.net/#/GridPane...Data_PostBack/" example and it work great, but my problem is when my report takes a few seconds even up to 1 minute, so all I want is to show a mask while the report is being build. I am building the Excel when the button is clicked, because only at that stage I have all the parameters for the Excel report. The highlighted line is the only addition to your example.
I have tried a long server side process, but then I can not use this.Response.
Any ideas are welcome.
I am using this "https://examples2.ext.net/#/GridPane...Data_PostBack/" example and it work great, but my problem is when my report takes a few seconds even up to 1 minute, so all I want is to show a mask while the report is being build. I am building the Excel when the button is clicked, because only at that stage I have all the parameters for the Excel report. The highlighted line is the only addition to your example.
I have tried a long server side process, but then I can not use this.Response.
Any ideas are welcome.
string strXml = xml.OuterXml;
System.Threading.Thread.Sleep (10000);
this.Response.Clear();
this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xml");
this.Response.AddHeader("Content-Length", strXml.Length.ToString());
this.Response.ContentType = "application/xml";
this.Response.Write(strXml);
this.Response.End();
Last edited by geoffrey.mcgill; Nov 12, 2012 at 5:17 PM.
Reason: please use [CODE] tags