I want to login as different users in different tabs of same browser.And I want to store user id,taken from database in Session["id"] on each login.How to prevent sharing of session["id] in multiple tabs?
Asked
Active
Viewed 7,370 times
1 Answers
4
Generally browsers share session state between multiple tabs by default.You may try this code to avoid the sharing ie, try to have tab based browser – session handling:
<configuration>
<system.web>
<sessionState cookieless="true"
regenerateExpiredSessionId="true" />
</system.web>
</configuration>
You may also check how to prevent the two session on a single browser using asp.net

KyleMit
- 30,350
- 66
- 462
- 664

Rahul Tripathi
- 168,305
- 31
- 280
- 331
-
But how can I create my own session variables using this? – Midhuna Nov 29 '13 at 06:29
-
How to use session variables if we apply this code? @Midhuna how did you mange to use session variables? – Mitesh Gadhiya Apr 14 '21 at 11:10