I have a two list where values get added from back end
List(SelectListItem) listItem = _db.tbl1(s => s.uc_name).Select(n =>
new SelectListItem
{
Value = n.uc_id.ToString(),
Text = n.uc_name
}).ToList();
List(SelectListItem) listitems1 = _db.tbl2.OrderBy(s => s.Description).Select(n =>
new SelectListItem
{
Value = n.ID.ToString(),
Text = n.Description
}).ToList();
I want to insert listitems1 in listItem
listItem.Insert(listItem.Count,(SelectListItem)listitems1);
but it shows me error as
cannot convert from generic list to system.web.mvc.selectlistitem