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,119 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
- 35,223
- 60
- 418
- 600
Rahul Tripathi
- 161,154
- 30
- 262
- 319
-
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