日期:2014-05-17  浏览次数:20756 次

C# button_click中问题! response.Write相关问题! 急!
大家好,我之前也碰到这问题,
简单说一下:
如下代码,写在button_click中

Response.Write( " <script> alert( '感谢您的评价!请勿重复提交! '); </script> ");
Response.Redirect("http://www.xxxx.com/xxx.aspx");


如果取消response.redirect,一点提交,跳出提示"xxxxx",然后在原界面不动。
加了response.redirect之后,就直接跳转了,不再跳出提示'感谢您的评价!请勿重复提交! '

如何解决呢?

我想先跳出提示,然后点击提示的确定按钮,自动跳转到上面的链接页面!

------解决方案--------------------
Response.Write( " <script> alert( '感谢您的评价!请勿重复提交! ');location.herf='http://www.xxxx.com/xxx.aspx' </script> ");
------解决方案--------------------
Response.Write( " <script> alert( '感谢您的评价!请勿重复提交! ');window.location.href = "http://www.xxxx.com/xxx.aspx";</script> ");