Unable to Evaluate Expression because the code is optimized or a native frame is on top of callstack
Error:
Unable to Evaluate Expression because the code is optimized or a native frame is on top of callstack
Cause:
when we declare the "Respone.Redirect" method in the try block the error will occur
Solution
1.Its better to specify the "Response.Redirect" method out side the try block
2.or else use this syntax
Response.Redirect("Somepage.aspx",false);
Error Description
When we declare the Response.Redirect method in the try block it will automatically call the Response.End method.
So to stop calling internally the Response.End Method we are providing the endparamter to be false
Cheers,
Myself