I am using asp.net mvc 4.
I have a header with two sections, top and bottom. The top section simply displays static links and images.
The bottom section will show a login button and other information when a user is not logged in.
Once the user logs in the bottom section will show user specific information and overall game play information. I want to reload this information whenever a user makes a request to a page on the site and I determine the data is stale.
Using asp.net web forms I could create a user control to represent the bottom sections functionality.
It appears in asp.net mvc I can use partial views and then call RenderAction which would allow a controller action to be called when rendering the bottom section.
In the controller action I could render one partial view for authenticated users and another partial view for unauthenticated users. I could also reload the data for authenticated users if it is determined to be stale.
Is this the best approach? I don't need ajax for my bottom section.
Thanks