private void FillDocumentDropdown(int catid, int subcatid, int?micId) { DataTable dtContact = new DataTable(); UserDetails objUserDetails = new UserDetails(); dtContact = objUserDetails.GetDocumentType(catid, subcatid, micId).Tables[0]; IList <Document> items = dtContact.AsEnumerable().Select(row => new Document { DocumentTypeId = row.Field <Int16>("DocumentTypeId"), DocumentTypeName = row.Field <string>("DocumentTypeName") }).ToList(); var list = new SelectList(items, "DocumentTypeId", "DocumentTypeName"); ViewData["DocumentId"] = list; }