Export data from server side with mask for a long running progress.
I am using https://examples2.ext.net/#/GridPane...Data_PostBack/ from server side as an example and it works, my problem is that the xls file that I build take a few seconds, upto a minute or 2, so how can I display a mask or any progress to the user?
[Html]
Code:
<ext:Button ID="btnXls" Text="To Excel" runat="server" Icon="PageExcel" ToolTip="Search for unallocated documents From date To date"
ToolTipType="Qtip" AutoPostBack="true">
</ext:Button>
I would like to use the following, just for consistancy of the whole application:
Code:
<ext:Button ID="btnXls" runat="server" Text="Search for unallocated documents From date To date">
<DirectEvents>
<Click OnEvent="btnXls_Click" Before="Ext.Msg.wait('Building report...', 'Report');"
Failure="Ext.Msg.show({
title : 'Error',
msg : 'Error during report building,
minWidth: 200,
modal : true,
icon : Ext.Msg.ERROR,
buttons : Ext.Msg.OK
});">
</Click>
</DirectEvents>
</ext:Button>
, but as soon as I use the code above, I then can not use:
Code:
Context.Response.AppendHeader("Content-Disposition", "inline;filename=" + System.IO.Path.GetFileName(TempFilename));
Context.Response.ContentType = AS2.MIME.MimeType.Get_MIMETypeFromFile(TempFilename);
Context.Response.AddHeader("Content-Length", (string)Microsoft.VisualBasic.FileLen(TempFilename));
Context.Response.WriteFile(TempFilename);
I have even tried https://examples2.ext.net/#/Miscella...r_Side_Update/, but it also give an error.
I can build the report in a handler like https://examples2.ext.net/#/GridPane...it_to_Handler/, but I can not see how to pass multi parameters like below?
Code:
ResourceManager1.AddScript("window.open('../Handler1.ashx?Type=Documents_Not_Received&UAType=" + dropDocumentType.SelectedItem.Text + "&FromDate=" + DateFrom.SelectedDate.ToString + "&ToDate=" + DateTo.SelectedDate.ToString + "&DepotID=" + DepotID + "&EmailAddress=" + (string)Session("EmailAddress") + "&SessionID=" + Session.SessionID + "','_blank')")
Can you sugest which way to go?