Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Have One Test1.aspx.
which stores grid value on rowcommand click in Session
Tab-1
C#
Session["gridval"]="1"


When i open same page in new tab and when i click on grid again it stores
Tab-2
C#
Session["gridval"]="2"



but when i update data on tab-1 it taking Session value as "2" and updating
Tab 1 data with Tab 2 Session Value.

I want tab wise Session Value to work on multiple tabs with same page

please help me


Thank in Advance

What I have tried:

I had Just Sotored Value in Sessions
Posted
Updated 18-Mar-16 5:53am
v2

Browser tabs are a client technology, your server and your code knows nothing about them. Sessions run off of cookies so if the browser uses the same cookies for the same site in different tabs then each tab will see the same session, there is nothing you can do about that, it is all down to how the browser deals with tabs and cookies.
 
Share this answer
 
not possible with session for storing value tab wise. try alternative to session may be viewstate can help you out if matches your requirement.
 
Share this answer
 
if you use same session variable for storing value it will over right values in same session variable. so you can make different-2 variable to store tab values.
Ashish
 
Share this answer
 
Comments
Ravi Sargam 18-Mar-16 10:42am    
I want use same variable in page, how to handle tab wise same session variable issue
Nigam,Ashish 21-Mar-16 2:39am    
Please see the answer no Solution 3.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900