First of all, excuse my terminology as I'm not an ASP.net MVC framework developer. My company is using an ASP.net MVC 5 framework. I'm developing the analytics code using Adobe DTM for this new framework. The issue I'm having is I recently worked on an Angular/Node.js implementation where my JavaScript files were only loaded initially and then ran on every view without being reloaded allowing me to keep track of states etc. I'm now working at a new company and they are using a ASP.net MVC 5 framework, but the JavaScripts are being reloaded every view. From what the developers are telling me, it is a hybrid where some pages use a controller and other pages don't. Is there a way to load JavaScript one time (initial load) and keep the JavaScript running (not destroying objects/variables)?
Thanks!
<a>tag/node will reset the page and cause everything to be reloaded into the browser (likely from cache, but all variables etc reset). Most MVC apps are either SPA or use simple links to pages to keep them lightweight and stateless. It's unlikely a 'normal' business application written in MVC would be a good candidate to be converted to SPA. I don't know Adobe DTM - can you hook into the C# code (server-side) ?