+ -
当前位置:首页 → 问答吧 → 请教ASP.NET 问题???

请教ASP.NET 问题???

时间:2011-11-29

来源:互联网

 
  insert into----------------------
  Response.Write("<script>alert('提交成功!')</script>");
  Response.Redirect("showros.aspx ");

上边为网页的部分代码,调试时为什么Response.Write("<script>alert('提交成功!')</script>");此句代码不执行,网页上不能弹出提示框,而是直接执行Response.Redirect("showros.aspx");代码。
如果此时注释掉Response.Redirect("showros.aspx");则 Response.Write("<script>alert('提交成功!')</script>");可以顺利执行。请教问题出在哪里?????

作者: mbchen2015   发布时间: 2011-11-29

Response.Write("<script>alert('提交成功!');location.href='howros.aspx';</script>");
不要 Response.Redirect了

作者: hookee   发布时间: 2011-11-29