You're on the right track with the idea of ββa basic controller, but I would override OnActionExecuted and generate the data there. Check if the result should be a ViewResult before generating shared data. There is no need to generate data if the result is a redirect or data returned via AJAX.
You can also consider creating a model only to view shared data (if the data is extensive) and put it in the ViewData as a whole. Then you can create a strongly typed partial view that takes the model and makes it easier to use the properties of the model in the view. Providing this partial view from the main page will facilitate both the inclusion of data on each page and their use in a strictly typified way.
If the footer data or formatting is not complicated, then it might be better to place a label on the main page.
source share