我用了一个框架做页面的,我想让用户session过期后不是让登陆页面出现在mainframe里面怎么做?急~!
如题 问题点数:20、回复次数:5Top
1 楼twtetgso(*学习再学习*)回复于 2004-12-03 12:33:31 得分 0
加上这个
<script language="JavaScript">
<!--
function window.onload()
{
if (window.location != top.location) {
top.location = window.location;
}
if(top.document.location.href != document.location.href){
top.document.location.href = document.location.href;
}
}
//-->
</script>Top
2 楼sunshine5211314(〖sunshine〗)回复于 2004-12-03 12:40:50 得分 8
if(Session["xx"]==null||Session["xx"].ToString()=="")
{
Response.Write("<script language=javascript>top.window.location='../default.aspx';</script>")
}Top
3 楼dcren118(酒仙)回复于 2004-12-03 12:42:51 得分 10
Response.Write("<script >top.location='default.aspx';</script>")Top
4 楼morality(业精于勤,行成于思!)回复于 2004-12-03 12:46:19 得分 2
private void Page_Load(...)
{
if(Session["xx"]==null||Session["xx"].ToString()=="")
{
Response.Write("<script language=javascript>window.top.location.href='login.aspx';</script>");
}
}
Top
5 楼tomtown530(梦想一定会实现!)回复于 2004-12-03 12:51:46 得分 0
呵呵,来晚了,就是那句top.loacation="新页"的功劳了,用response打印到页里就OK了Top




