Wenn Button geklickt wird, während Loader auf dem Bildschirm angezeigt wird, habe ich eine große Menge von pdf
von html
generiert. nachdem alle generierten Dateien gezippt und Download in browser..there ich brauche ich nicht aufhören konnte loader SoIch möchte Loader beim Postback starten, das wird nach dem Postback anhalten?
Response.AddHeader("Content-Disposition", "attachment; filename=output.zip");
Response.TransmitFile(zipPath);
verwenden .. Bitte helfen Sie mir ..
Code Behind:
protected void Button1_Click(object sender, EventArgs e)
{
string test = GetImportDetailsPDF("ImportFile(2)_2017.12.19-12.30.24.xlsx");
//Generated all pdf files zipped and downloaded here
string startPath = Server.MapPath("/ImportPdf/");
string zipPath = Server.MapPath("/ImportZip/result.zip");
ZipFile.CreateFromDirectory(startPath, zipPath);
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
Response.ContentType = "image/jpeg";
Response.AddHeader("Content-Disposition", "attachment; filename=output.zip");
Response.TransmitFile(zipPath);
HttpContext.Current.Response.Flush(); // Sends all currently buffered output to the client.
HttpContext.Current.Response.SuppressContent = true; // Gets or sets a value indicating whether to send HTTP content to the client.
HttpContext.Current.ApplicationInstance.CompleteRequest(); // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event.
HttpContext.Current.Response.End();
}
public string GetImportDetailsPDF(string FileName)
{
//Here i have generated large amount of pdf generated from html page..
return "Successfully Imported";
}
Was Blockierwerkzeug verwenden Sie ... Und wie wird es initiiert ... jQuery Blockui, etc. – DotNetDev