I have stumbled upon this situation where I set a viewbag variable inside a MVC controller, but can't read it inside the master page, the viewbag variable shows always null in the masterpage.
I suspect that this is because the masterpage is being rendered before the page controller call, but still I need to somehow communicate backwards.