Yogesh Gupta

Yogesh Gupta

  • 1.6k
  • 157
  • 15.3k

Render different view in multiple tabs

Jan 19 2018 1:19 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 ?
 
Any ideas/advice would be most welcome.
 
Thanks 

Answers (2)