title: Asp.Net Mvc - How to have a "controller" in shared view
body: <p>I have a shared view in my _Layout.cshtml for my header named "_Header.cshtml".</p>
  
  <p>I would like to display text and image from the database, so I need my controller to go in the database and return it to the _Header.cshtml.</p>
  
  <p>How can I do that because the controller called is always different each page the user goes. Is there a way to have controller with Shared View?</p>
  
  <p>Here is the _Layout.cshtml</p>
  
  <p>
      </p>
  
  <pre><code>    &lt;div id="header"&gt;
          &lt;div id="title"&gt;
              @Html.Partial("_Header")
          &lt;/div&gt;
  
          &lt;div id="logindisplay"&gt;
             @Html.Partial("_CultureChooser")
              &lt;br /&gt;
             @Html.Partial("_LogOnPartial")
          &lt;/div&gt;
  
          &lt;div id="menucontainer"&gt;
             @Html.Partial( "_MenuPartial")
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div id="main"&gt;
          @RenderBody()
          &lt;div id="footer"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>