How does data pass from view to view in C sharp . NET Framework

The app was written by C# (MVC), combining ts and js as front end. The problem is: I am in ViewA(written with ts) that need to navigate to ViewB(written with js), before the navigation, I need to retrieve some data(check if ViewB has drafted conversation) from ViewB and pop up a window to ask the user to stay or discard drafted conversation.

There are many ways to fix the problem, but each has some issues to solve.

  1. If I check from ViewA(ts), how do I get the data from ViewB(js)?
  2. I can navigate to ViewB and pop up a window, but the draftedConversation object will be erased in C# controller file during onParametersUpdated, which means before it reaches to OnActivate() of the ViewB js file, the data will be erased, and can not do the checking. Is there a way to popup a window in C# file? I saw it usually does it on js file, not sure if that breaks the MVC rule.

If those two ways do not work, I might need to refactor the c# controller file. any suggestion will be appreciated, thanks!