这个异常是什么原因??大侠指点
我用以下方法导出数据时 在Repose.end()这里出了异常,
Data = Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
但是之前用的时候好像没有这样的异常,不知道什么原因,大侠指点一下!!
public void Export(string FileType, string FileName)
{
Response.AppendHeader("Content-Disipostion", "attachment;filename=" + HttpUtility.UrlEncode(FileName, System.Text.Encoding.Default).ToString());
Response.ContentType = FileType;
this.EnableViewState = false;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
gv.RenderControl(hw);
Response.Write(tw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
//base.VerifyRenderingInServerForm(control);
}
Data = Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.