iframe 框架中main 页面设置session ,超时只有main页跳转到指定页面的解决

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["username"] == null || Session["pwd"] == null)
            {

                Response.Write("<script>window.top.location.href='login.aspx '</script>");

            }
        }
    }
posted @ 2012-05-29 16:17  黑桃_K  阅读(137)  评论(0编辑  收藏  举报