I have the next code, that it's executed after a postback inside a grid(www.tedit.net)
I already see this next:
not-on-top-of-call-stack
My problem is when the code reaches Response.End it throws an exception error. In the link I mention, it doesnt say how to resolve the issue.
This is the error message:
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Can you help please?
ExcelFile efE = new ExcelFile(); |
ExcelWorksheet wsE = efE.Worksheets.Add("email"); |
Response.Clear(); |
Response.ContentType = "application/vnd.ms-excel"; |
Response.AddHeader("Content-Disposition", "attachment; filename=" + e.Row["rowno"] + "_Email.xls"); |
efE.SaveXls(Response.OutputStream); |
Response.End(); |
I already see this next:
not-on-top-of-call-stack
My problem is when the code reaches Response.End it throws an exception error. In the link I mention, it doesnt say how to resolve the issue.
This is the error message:
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Can you help please?