public static SelectList GetExportApi(string ConncetionString, string ExportCategory) { // Get All tags type code from the database and fill the dropdown List <SelectListItem> lstAllFilter = new List <SelectListItem>(); SettingFacade fac = new SettingFacade(ConncetionString); DataTable dt = fac.GetExportTablesApiName(ExportCategory); for (int i = 0; i < dt.Rows.Count; i++) { lstAllFilter.Add(new SelectListItem { Value = dt.Rows[i]["APIName"].ToString(), Text = dt.Rows[i]["APIName"].ToString() }); } return(new SelectList(lstAllFilter, "Value", "Text")); }