I am very new to MVC Core .NET 8. What I’ve learned so far is the MVC structure always triggers a postback when changing Views.
With my current application (which was built as a static page app in ASP.NET 4.8.1 with 1 SiteMaster/ChildPage [which swapped my sub pages inside it] ) I was able to load my navigation UI from SQL with pretty much 1 API request call unless the user refreshed the browser tab.
In MVC Core, every view I load triggers the postback and I end up calling the SQL request to rebuild it otherwise it is lost. Is this normal practice with MVC Core? This seems like a major increase in API request due to the postback response. Is there any way to simulate how static pages worked in ASP.NET with MVC Core so that the “outer wrapper/master/layout” stays static?
I’ve debated using a cookie for each nav icon (since at the moment I only have 6 options) but this seems excessive… I am also trying to avoid storing the nav in a Session object because I host my site in Azure (which has in the past shown poor response to keeping sessions alive correctly).