title: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'CategoryID'
body: <p>this is my controller action</p>
  
  <pre><code> public ActionResult AddNewPost(string subName)
          {
            ViewBag.CategoryID = new SelectList(from c in db.Categories where c.Status == true select c, "CategoryID", "CategoryName");
            return View();
          }
  </code></pre>
  
  <p>in view i have populated dropdown as</p>
  
  <pre><code>&lt;td&gt;
      @Html.DropDownList("CategoryID", "-- Select --")
  &lt;/td&gt;
  </code></pre>
  
  <p>but when i try to access the drop down value in controller i get this error
  "There is no ViewData item of type 'IEnumerable' that has the key 'CategoryID'." </p>