I have a list view And i want to add a create partial to the page.
@model IEnumerable <blah.Domain.Entities.blah>
@Html.Partial("_Quickblah", new blah.Domain.Entities.blah());
public ViewResult _Quickblah()
{
ViewBag.CategoryID = new SelectList(Repository.Categorys, "CategoryID", "Title");
Blah blah = new Blah () { CreatedDate = DateTime.Now };
return View(blah);
}
and i get the error
There is no ViewData item of type 'IEnumerable' that has the key 'CategoryID'.
how can i fix this?