public static SelectList GetAcceptedBy(string ConnectionString) { SettingFacade fac = new SettingFacade(ConnectionString); DataTable dt = fac.GetAcceptedBy(); List <SelectListItem> lstAcceptedBy = new List <SelectListItem>(); for (int i = 0; i < dt.Rows.Count; i++) { lstAcceptedBy.Add(new SelectListItem { Value = dt.Rows[i]["AcceptedBy"].ToString(), Text = dt.Rows[i]["AcceptedBy"].ToString() }); } return(new SelectList(lstAcceptedBy, "Value", "Text")); }