public ActionResult GetSubCategoryList(int categoryId) { List <tblSubCategory> selectList = service.GetbyCategoryID(categoryId).ToList <tblSubCategory>(); ViewBag.SubCategoryList = new SelectList(selectList, "subCategoryID", "categoryName"); return(PartialView("DisplaySubCategories")); }