public ActionResult AddHeading() { List <SelectListItem> listCategoryName = (from h in cm.GetCategoryList() select new SelectListItem { Text = h.CategoryName, Value = h.CategoryId.ToString() }).ToList(); List <SelectListItem> listWriterName = (from w in wm.GetListBl() select new SelectListItem { Text = w.WriterName, Value = w.WriterId.ToString() }).ToList(); ViewBag.vlc = listCategoryName; ViewBag.writer = listWriterName; return(View()); }
public ActionResult Index() { return(View(wm.GetListBl())); }