private void populateCountryList() { DataTable dt = Utils.GetCountryList(); if (dt.Rows.Count > 0) { ddlCountry.DataValueField = "countrycode"; ddlCountry.DataTextField = "Countryname"; ddlCountry.DataSource = dt; ddlCountry.DataBind(); } }
private void populateCountryList() { DataTable dt = Utils.GetCountryList(); if (dt.Rows.Count > 0) { ddlCountry.DataValueField = "countrycode"; ddlCountry.DataTextField = "Countryname"; ddlCountry.DataSource = dt; ddlCountry.DataBind(); ddlCountry.SelectedIndex = ddlCountry.Items.IndexOf(ddlCountry.Items.FindByText("United States")); ddlShipCountry.DataValueField = "countrycode"; ddlShipCountry.DataTextField = "Countryname"; ddlShipCountry.DataSource = dt; ddlShipCountry.DataBind(); ddlShipCountry.SelectedIndex = ddlCountry.Items.IndexOf(ddlCountry.Items.FindByText("United States")); } }