protected void GetCountry() { Countrytbl ls = new Countrytbl(); List <Countrytbl> lst = new List <Countrytbl>(); lst = objCountryBL.GetAllCountry(ls).ToList(); gdvCountry.DataSource = lst; gdvCountry.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { CountryBL objCountryBL = new CountryBL(); lstCountry = objCountryBL.GetAllCountry(cnt).ToList(); if (!IsPostBack) { GetCountry(); GetState(); } }
protected void GetCountry() { List <Countrytbl> lstCountry = new List <Countrytbl>(); Countrytbl ctry = new Countrytbl(); CountryBL objcountryBL = new CountryBL(); lstCountry = objcountryBL.GetAllCountry(ctry).ToList(); foreach (var cnt in lstCountry) { ListItem li = new ListItem(); li.Text = cnt.CountryName; li.Value = cnt.CountryID.ToString(); DDlCountry.Items.Add(li); } }