title: C# MVC Dropdownlist no ViewData item
body: <p>I am having an issue with a dropdownlist I have in a <code>PartialView</code>. </p>
  
  <p>Basically get the following error
  <code>There is no ViewData item of type 'IEnumerable&lt;SelectListItem&gt;' that has the key 'Status'.</code></p>
  
  <p>Here is my <code>ActionResult</code> method inside the controller</p>
  
  <pre><code>[HttpGet]
  public  ActionResult Status()
  {
     List&lt;SelectListItem&gt; Status = new List&lt;SelectListItem&gt;();
  
     Status.Add(new SelectListItem { Text = "Open", Value = "1" });
     Status.Add(new SelectListItem { Text = "Closed", Value = "2" });
     Status.Add(new SelectListItem { Text = "Delete", Value = "3" });
  
     ViewData["Status"] = Status;
  
     return View();
  }
  </code></pre>
  
  <p>My <code>Status</code> Partial View where I call the select list</p>
  
  <pre><code>@Html.DropDownList("Status", ViewData["Status"] as SelectList)
  </code></pre>
  
  <p>And then I call the partial view from my main view as follows</p>
  
  <pre><code>@Html.Partial("Status")
  </code></pre>
  
  <p>I am just not sure why its giving the above error. I took at look at this <a href="https://stackoverflow.com/questions/2308731/asp-net-mvc-dropdownlist-no-viewdata-item">asp.net mvc dropdownlist no ViewData item</a> and still not able to rectify the issue? </p>
  
  <p><strong>Update</strong></p>
  
  <p>As per @MikeDebela solution my Status Action Item was never been called. So used the following syntax to call the Action directly</p>
  
  <pre><code>@{Html.RenderAction("Status");}
  </code></pre>