title: ASP.NET MVC partial view that updates without controller
body: <p>I have a partial view that shows a list of <code>Categories</code>. I'd like to put that partial view on any page, but I'd like to have it to call to the service and get a list of <em>categories</em> by itself without me having to do that in every controller action. Something like webforms in which you can put a code-behind on it.</p>
  
  <p>For eg.</p>
  
  <p><strong>Actions</strong></p>
  
  <pre><code>    public ActionResult Index()
      {
          JobListViewModel model = new JobListViewModel();
          model.Categories= jobService.GetCategories();
  
          return View(model);
      }
  
      public ActionResult Details(int id)
      {
          Job job = jobService.GetJob(id);
          return View(job);
      }
  </code></pre>
  
  <p>I created a partial that will take the <code>model.Categories</code> model and display a list. As you can see, the Index page will work fine, but I do not want to call it again in the Details page. Is there a way to make my partialview call to the <code>GetCategories()</code> service by itself?</p>