J
Jurjen de Groot
I have an 'Export' button on my page, when clicking this button, a file is
streamed to the client like this :
lblMessage.Text = "Thank you for downloading...";
System.IO.FileInfo objFI = new System.IO.FileInfo(FullFileName);
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=" + DownloadFileName);
System.Web.HttpContext.Current.Response.AddHeader("Content-Length",
objFI.Length.ToString());
System.Web.HttpContext.Current.Response.ContentType =
"application/octet-stream";
System.Web.HttpContext.Current.Response.WriteFile(objFI.FullName);
System.Web.HttpContext.Current.Response.End();
This works perfectly but after downloading, the page on wich the
download/export was initiated doesn't update, the lblMessage isn't updated
as is a button wich should become visible after download. I'm not sure how
to accomplish this.
Could anyone point me in right direction.
TIA,
Jurjen.
streamed to the client like this :
lblMessage.Text = "Thank you for downloading...";
System.IO.FileInfo objFI = new System.IO.FileInfo(FullFileName);
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=" + DownloadFileName);
System.Web.HttpContext.Current.Response.AddHeader("Content-Length",
objFI.Length.ToString());
System.Web.HttpContext.Current.Response.ContentType =
"application/octet-stream";
System.Web.HttpContext.Current.Response.WriteFile(objFI.FullName);
System.Web.HttpContext.Current.Response.End();
This works perfectly but after downloading, the page on wich the
download/export was initiated doesn't update, the lblMessage isn't updated
as is a button wich should become visible after download. I'm not sure how
to accomplish this.
Could anyone point me in right direction.
TIA,
Jurjen.