public IActionResult About() { DataSet ds = dbop.GetCountry(); List <SelectListItem> list = new List <SelectListItem>(); foreach (DataRow dr in ds.Tables[0].Rows) { list.Add(new SelectListItem { Text = dr["Country_name"].ToString(), Value = dr["Country_id"].ToString() }); } ViewBag.Counrtylist = list; return(View()); }