protected void btnExcel_Click(object sender, EventArgs e) { view_report(); try { Rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Employee Report"); } catch (Exception ex) { Console.WriteLine(ex.Message); ex = null; } finally { btnExcel.enabled=true; Rpt.Dispose(); Rpt.Close(); } }
ExportToHttpResponse
Response.End
HttpContext.Current.ApplicationInstance.CompleteRequest
Application_EndRequest
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)