iframe注销问题 [英] Iframe logout issue

查看:61
本文介绍了iframe注销问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的一页中,我将iframe(客户端)放在我的页面(details.aspx)中.我正在从JavaScript函数更改iframe源.当发生会话超时时,我在iframe中显示的页面将重定向到登录页面.我需要将details.aspx重定向到login.aspx.

我在网站上使用自定义角色管理.我试图调用下面的代码.但是javascript当时无法调用.



In my one page, i put iframe(client side) in my page (details.aspx). I am changing iframe source from my javascript function. when session timeou occure, my page which shows in iframe is redirect to login page. I need to redirect details.aspx to login.aspx.

I am using custom role management in my site. I tried to call below code. but javascript can''t call at that time.

protected void Page_PreInit(object sender, EventArgs e)
{
    if (HttpContext.Current.Session["AccountID"] == null)
    {
        ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "parent.location=''login.aspx''", true);

    }
}



任何人都可以面对这个问题吗?



can anyone had face this problem? any proper solution for this problem?

推荐答案

引用链接,可能会有所帮助:



http://usablelayout.com/articles/automatically-break-out-iframe [ ^ ]




refer link, might helps:



http://usablelayout.com/articles/automatically-break-out-iframe[^]




这篇关于iframe注销问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆