c# - Error: Unable to evaluate expression because the code is optimized -
i getting error in asp.net app reads
"unable evaluate expression because code optimized or native frame on top of call stack."
protected void btncustomerprofile_click(object sender, eventargs e) { try { server.transfer("customerprofile.aspx"); } catch (exception ex) { response.write(ex.tostring()); } { } }
after searching so, see of similar posts involve response.redirect. code using server.transfer , application using master pages.
how can resolve issue?
update: reason, error occurs use response.redirect well. unfortunately cannot use server.execute, because server.execute calls calling page towards end.
you error, code block below trap , can on life.
try this:
using system.threading.threadabortexception; catch(threadabortexception ex) { throw; }
Comments
Post a Comment