Yogesh Gupta

Yogesh Gupta

  • 1.6k
  • 157
  • 15.1k

Multiple tabs Issue Using TEMPDATA

Jan 20 2018 12:55 AM
Hi Friends,
I have an MVC app and I've run into a problem with modern multitab browsers.
I have a screen that creates a model and stores it in this.TempData["MyViewModel"].
then open the same screen in a 2nd tab and as it calls the same controller methods this.TempData["MyViewModel"] is once again set.
If I then go back to Tab 1 and refresh the page, I am presented with the data I entered in Tab 2.
Is there a way to store data in TempData uniquely per browser tab ?
 
Caching is not fit in my scenario. because i am working on Hotel booking portal.
and user open multiple tab for compair the hotel price and booking.
so in my case each of the tab working separately.
 
Any ideas/advice would be most welcome. 

Answers (1)