Hello friends,
when i export data from grid view to excel file.
data successfully export but method throw an exception.
Exception is......
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
Loading
Sanuja KhanPosted May 27, 2016, 7:39 AM
Jitendra TiwariPosted Mar 24, 2010, 7:31 AM
Jitendra PatelPosted Mar 24, 2010, 7:04 AM
please write this in web.config file.
Thanks,
Jitendra Patel
Amit ChoudharyPosted Mar 24, 2010, 5:51 AM
Overiding VerifyRenderingInServerForm Method
public override void VerifyRenderingInServerForm(Control control){
/* Confirms that an HtmlForm control is rendered for the specified ASP.NET
server control at run time. */
}
and your grid will export correctly without any exception i hope.
please mark as answer if it helps.
VasanthPosted Mar 24, 2010, 5:33 AM
Call the HttpContext.Current.ApplicationInstance.CompleteRequest method instead of Response.End to bypass the code execution to the Application_EndRequest event.
If its helps out , please mark as answer