Thursday, April 15, 2010

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

Error:
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

Reason/Root Cause:
When we call Response.Redirect("") to redirect an aspx page to another aspx page from try/catch block in asp.net code, you will receive the above error.










Sample error code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)

No comments:

Post a Comment