I have a page which contains a button that perform the following code, I want to reload the page after the response end so that update a grid in that page. or suggest a way to update the grid after response end.
string report = new BLL.OrderReport.OrderReport().GenerateFullfilmentReport(fromdate, toDate
, string.IsNullOrEmpty(generationId)? null : ((int?)int.Parse(generationId)) );
if (!string.IsNullOrEmpty(report))
{
LoadReportHistory();
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment; filename=Report.text");
Response.Write(report);
Response.End();
}
Thanks
I work around this, the problem is that I need the Grid to be rebind after Response.End is called.
The target is updating the Grid when user click download. To work this out I rebind the grid first, and register a java script code to cause reloading the page (post back event will be resent),
in the second round I download the file.
I control this miss by copying the original file to temp file, then delete the temp file during first round, if the file exist then download.
Someone tell me something better please