我想先显示
Response.Write("<script>alert('创建成功!')</script>");
然后再转向另一页(我不想用"Server.transfer")
Response.Redirect("xxx.aspx");但对话框却无法显示??怎样解决?

解决方案 »

  1.   

    因为页面已经跳转了
    Response.Write("<script>alert('创建成功!');window.location.href='xxx.aspx'</script>");
      

  2.   

    Response.write("<script language=javascript>alert('创建成功!');window.location.href='xxx.aspx';</script>")
      

  3.   

    Response.Write("<script>alert('创建成功!');window.open('xxx.aspx','_self')</script>");
      

  4.   

    Response.Write("<script>alert('创建成功!');window.location='xxx.aspx';</script>");
      

  5.   

    页面服务器端跳转了,输出到原来页的alert当然不起作用了
      

  6.   

    就是啊,它直接跳转了,你用Response.Write("<script>alert('创建成功!');window.location='index.aspx';</script>");