非常简单的使用:
Response.Write("<script LANGUAGE='javascript'>alert( Wrong!');history.go(-1);</script>");
Response.End();catch到错误。代码如下
E = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}
请问原因,如何解决~~~~

解决方案 »

  1.   

    http://blog.csdn.net/skyaspnet/archive/2008/03/18/2194793.aspx
      

  2.   


    Response.Write("<script>alert( 'Wrong!');</script>");
    Response.Write("<script>history.go(-1);</script>");Response.End();
      

  3.   

    对于 Response.End,调用 ApplicationInstance.CompleteRequest 方法而不调用 Response.End,以便跳过 Application_EndRequest 事件的代码执行。 
    对于 Response.Redirect,使用重载 Response.Redirect(String url, bool endResponse),对 endResponse 参数它传递 false以取消对 Response.End 的内部调用