1.Response.Write("<script language=javascript>parent.left.document.location.reload();</script>");
2.Response.Write("<script>window.top.location='login.aspx';window.close</script>");
3.this.RegisterStartupScript("reload","<script>window.parent.frames('left').location.reload(true);</script>"); 或
this.RegisterStartupScript("reload","<script>window.parent.frames('left').location.href=window.parent.frames('left').location.href;</script>");

本文介绍了三种在ASP.NET中实现页面刷新和跳转的方法:使用Response.Write发送JavaScript代码来刷新父窗口的左侧框架、将顶部窗口重定向到登录页面并关闭当前窗口,以及通过RegisterStartupScript注册启动脚本来实现更为复杂的刷新逻辑。

被折叠的 条评论
为什么被折叠?



