title: Error executing child request for handler - Partial View Called From Controller
body: <p>I have a method in my Home Controller that returns a partial view, but when I run my application I get the error.</p>
  
  <blockquote>
    <p>Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.</p>
  </blockquote>
  
  <p>The Method in my controller gets the model and returns the partial view.</p>
  
  <pre><code>public PartialViewResult _GetToDo()
          {
              using (KnightOwlContext db = new KnightOwlContext())
              {
                  var todoList = new List&lt;ViewModels.ToDo&gt;();
                  DashboardHelper dashHelper = new DashboardHelper(db);
  
                  var results = dashHelper.GetToDoList(StaffId);
  
                  foreach(var r in results)
                  {
                      todoList.Add(new ViewModels.ToDo()
                      {
                          ToDoId = r.ToDoId,
                          Complete = r.Complete,
                          Date = r.Date,
                          Priority = GetPriority(r.Priority),
                          StaffId = r.StaffId,
                          Text = r.Text
                      });
                  }
  
                  return PartialView("_ToDo", todoList);
              }
          }
  </code></pre>
  
  <p>And I call this method in my View:</p>
  
  <pre><code>@Html.Action("_GetToDo", "Home")
  </code></pre>
  
  <p>The method is in my 'Home Controller' and the Partial View is called from Views > Home > Index </p>
  
  <p>So far I've tried Html.Partial and Html.RenderPartial and neither of those work either with a different error message. I'm completely at a loss as to how to return the partial view, what is it I'm doing wrong? </p>