iframe登录超时跳转登录页面

1.可以在登录页面加jQuery验证

$(function () {
    //判断一下当前是不是做顶层,如果不是,则做一下顶层页面重定向
    if (window != top) {
        top.location.href = location.href;
    }
});

2.OnActionExecuting方法中修改filterContext.Result

filterContext.Result = new ContentResult() { Content = "<script>top.window.location.href='/user/Login'</script>" };
原文地址:https://www.cnblogs.com/wangx036/p/7358547.html