Click here to Skip to main content
12,512,515 members (43,788 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
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
Posted 11-Dec-12 1:31am
Updated 11-Dec-12 2:23am
Comments 11-Dec-12 7:33am
may be u can detect it by checking IP Address of each session.
Hari Krishna Prasad Inakoti 11-Dec-12 7:35am
can u explain? 11-Dec-12 7:40am
In your global.asax file, overload session_start method create a global app level list of sessions and ip addresses.
And before adding to this list, Loop through all sessions and check the IP address or current session is same as any previous session or not?
If already exists with same IP then deny otherwise add current to list and let user access the site.
Hari Krishna Prasad Inakoti 11-Dec-12 7:53am
can u give the code?.I'm new one of .net
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.Session("id") = ss.SessionID
        End If
    End Sub

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160929.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100