title: Using a Base Controller for obtaining Common ViewData
body: <p>I am working on an ASP.NET MVC application that contains a header and menu on each page.  The menu and header are dynamic.  In other words, the menu items and header information are determined at runtime.</p>
  
  <p>My initial thought is to build a base Controller from which all other controllers derive.  In the base controller, I will obtain the menu and header data and insert the required information into the ViewData.  Finally, I will use a ViewUserControl to display the header and menu through a master page template.</p>
  
  <p>So, I'm trying to determine the best practice for building such functionality.  Also, if this is the recommended approach, which method should I override (I'm guessing Execute) when obtaining the data for insertion into the ViewData.</p>
  
  <p>I'm sure this is a common scenario, so any advice/best-practices would be appreciated!  Thanks in advance!</p>
  
  <p>EDIT:
  I did find the following resources after posting this (of course), but any additional anecdotes would be awesome!</p>
  
  <p><a href="http://www.singingeels.com/Blogs/Nullable/2008/08/14/How_to_Handle_Side_Content_in_ASPNET_MVC.aspx" rel="nofollow noreferrer">http://www.singingeels.com/Blogs/Nullable/2008/08/14/How_to_Handle_Side_Content_in_ASPNET_MVC.aspx</a></p>
  
  <p><a href="https://stackoverflow.com/questions/326987/how-do-you-use-usercontrols-in-aspnet-mvc-that-display-an-island-of-data">How do you use usercontrols in asp.net mvc that display an &quot;island&quot; of data?</a></p>