如何检测同一Web应用程序的多个窗口或选项卡? [英] How to detect multiple windows or tabs for same webapplication?

查看:85
本文介绍了如何检测同一Web应用程序的多个窗口或选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何为某些Web应用程序检测多个窗口或标签?

如果我在一个标签中打开同一个Web应用程序,我想限制网站从另一个标签打开。任何一个给代码PLZ。



谢谢和问候

Hari

Hi All,
How can I detect multiple windows or tabs for some web application?
If i open same web application in one tab, i want to restrict site from opening in another tab.Any one give code plz.

Thanks & Regards
Hari

推荐答案

大家好,

我有解决方案





Hi All,
I got Solution


Public Sub TheSessionId()
        Dim ss As HttpSessionState = HttpContext.Current.Session
        If Not HttpContext.Current.Session("id") Is Nothing Then
            HttpContext.Current.Response.Redirect("InvalidAccess.aspx")
        Else
            HttpContext.Current.Session("id") = ss.SessionID
        End If
    End Sub


您好,

检查这个链接看看是否有帮助:

disable-new-windowtab-in-web-applications [ ^ ]

检测并阻止多个窗口o Web应用程序中的r选项卡使用 [ ^ ]
Hello,
Check this link see if it helps:
disable-new-windowtab-in-web-applications[^]
Detect and prevent multiple windows or tab usage in Web Applications[^]


只检查上一个会话是否处于活动状态,如果活动重定向到登录/错误页面
just check previous session is active or not and if active redirect to login/error page


这篇关于如何检测同一Web应用程序的多个窗口或选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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