首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

C# button_click中有关问题! response.Write相关有关问题! 急

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

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> ");

热点排行